iTorque Objects Stops on Collision Problem
by Claudio Torres · in iTorque 2D · 05/21/2011 (7:48 am) · 11 replies
My Game uses many game objects with Send and Received Collision and Bounce as Collision Response. This objects are with Physics enable due to I use setLinearVelocity to move some objects which bounces all over the Scene.
I notice that in some case two objects collide and instead of bouncing, they just stop and freeze. The rest of the game works fine, and if other object bounces on the frozen objects, they start move again.
this effect causes that some time the objects start to stop on a wall and keep there instead of bouncing.
It looks like a bug, once I use no script for this objects, just Collision and Velocity.
Any clue or help?
I notice that in some case two objects collide and instead of bouncing, they just stop and freeze. The rest of the game works fine, and if other object bounces on the frozen objects, they start move again.
this effect causes that some time the objects start to stop on a wall and keep there instead of bouncing.
It looks like a bug, once I use no script for this objects, just Collision and Velocity.
Any clue or help?
About the author
Electronic Engineer, MSc on System, Software Developer, Digital Marketing Consultant. Today I managing Torres Studios, a new Game and Entertainment Studio focus on create innovative iPad and XBOX 360 Games.
#2
But some times, the second object explodes in spite of the barrier, meaning that the bouncy object is detected to late by the collision engine.
If this happens also with collision of bouncy objects, the bouncy object will looks like stick to the wall, but in fact it is bouncy in and out on pixel because the late detection allows the object to get inside the wall.
Need some answer from GG people. Is there a fix for this collision engine bug?
05/21/2011 (6:43 pm)
In my tests I notice also that the object interpenetrate the static one. For example, if I have two object, first is a barrier and second a object that explodes, the bouncy object bounce at the barrier and do not explode the second object.But some times, the second object explodes in spite of the barrier, meaning that the bouncy object is detected to late by the collision engine.
If this happens also with collision of bouncy objects, the bouncy object will looks like stick to the wall, but in fact it is bouncy in and out on pixel because the late detection allows the object to get inside the wall.
Need some answer from GG people. Is there a fix for this collision engine bug?
#3
05/22/2011 (6:56 pm)
How high are your velocity values?
#4
The object that interpenetrate and explode the target, in spite of the blocking barrier, are 600 Linear Velocity.
05/23/2011 (6:36 am)
The objects that stick on the wall, instead of bouncing are from 20 to 40 Linear Velocity.The object that interpenetrate and explode the target, in spite of the blocking barrier, are 600 Linear Velocity.
#5
The second case makes sense, because that high of a velocity is probably causing the object to move faster than it can update. You will need to significantly reduce the velocity.
05/23/2011 (6:40 am)
In the first case, are the objects colliding head on or at an angle? The second case makes sense, because that high of a velocity is probably causing the object to move faster than it can update. You will need to significantly reduce the velocity.
#6
Second Case: 600 doesn't look that fast at the screen. Any Way I will create a script to avoid that.
05/23/2011 (7:42 am)
First Case: Usually the objects collide at an angle.Second Case: 600 doesn't look that fast at the screen. Any Way I will create a script to avoid that.
#7
05/23/2011 (7:56 am)
@Claudio - What happens when you tweak the friction and restitution of the objects that are getting stuck? Also, do they have the same velocity when they are colliding.
#8
05/23/2011 (8:56 am)
I tested with friction 0 and restitution 1, at the object and wall, and the object stil get stucked.
#9
05/30/2011 (4:23 pm)
did you get any further with this, because I am having the same problem
#10
I solve the problem changing all objects to Poligon
05/30/2011 (6:30 pm)
I found the problem. Is a bug at the iTorque 1.4.1. You MUST use Poligon in all objects at the detection mode. If you use CIRCLE, collision/physics doens't works as expected, and the object get stucked in something with Poligon.I solve the problem changing all objects to Poligon
#11
05/30/2011 (6:50 pm)
thanks! I had a ball bouncing of objects and it was getting stuck same as you described, even at very low velocities ie. 20 I changed it and now works perfect.
Torque Owner rennie moffat
Renman3000