Sticky Collisions Stop
by Craig Perko · in Torque Game Builder · 03/05/2008 (12:23 pm) · 1 replies
Hi.
I'm trying to make a game where the main character can collide with a large object and "grab" it. If I set him to sticky, it sort of works, but then he suddenly stops. This doesn't make much sense: the game is in zero grav, and both he and the object should continue moving based on their summed force.
If I try to manually add the force to them, they separate instead of remaining linked.
Right now, I'm trying to get around this by giving the player a "hand" that the object mounts to, but this causes a lot of trouble as well, such as either absurdly side-effect heavy collisions with the body of the player or, if I try to fix that, passing through the body of the player. This is especially problematic when I need the player to "throw" the object - sending it and him in opposite directions.
Since the player "points at" the mouse, the object he grabs needs to move to do this as well. This isn't a simple block-pushing problem...
Does anyone have any experience with this? Is there any way to do this?
Bonus points: ways to implement realistic torque!
-Craig
I'm trying to make a game where the main character can collide with a large object and "grab" it. If I set him to sticky, it sort of works, but then he suddenly stops. This doesn't make much sense: the game is in zero grav, and both he and the object should continue moving based on their summed force.
If I try to manually add the force to them, they separate instead of remaining linked.
Right now, I'm trying to get around this by giving the player a "hand" that the object mounts to, but this causes a lot of trouble as well, such as either absurdly side-effect heavy collisions with the body of the player or, if I try to fix that, passing through the body of the player. This is especially problematic when I need the player to "throw" the object - sending it and him in opposite directions.
Since the player "points at" the mouse, the object he grabs needs to move to do this as well. This isn't a simple block-pushing problem...
Does anyone have any experience with this? Is there any way to do this?
Bonus points: ways to implement realistic torque!
-Craig
About the author
Torque Owner Kevin James
I'm working on a platform game in which you can grab onto ledges, even moving platforms. (and the player moves with the platform!)
It still has some minor problems, but an interesting thing I found is that when you convert the world units that the player is at to local units of the object he should mount to, you have to multiple the x and y by -1 for apparently no reason.
I'll post the source if you're interested.