Game Development Community

Collision Depth/Penetration

by Phillip O'Shea · in Torque Game Builder · 09/14/2007 (3:30 am) · 2 replies

I strongly feel that the onCollision function should contain details of the X and Y depth/penetration.

Sometime, the collision system is unable to detect a (possible) collision either before the contact is made, or when the contact is made. This may result in the source object actually entering the other object, which is bad no doubt. If the amound of penetration is known, an offset can be applied.

I have attempted to script all of this, but, it appears that the collision detection system is preemptive. This means that I cannot find an accurate penetration distance, when I need accurate numbers.

About the author

Head of Violent Tulip, a small independent software development company working in Wollongong, Australia. Go to http://www.violent-tulip.com/ to see our latest offerings.


#1
09/14/2007 (7:28 am)
When I need the collision system to stop being preemptive, I can sometimes get the information I need from using a trigger (which is not preemptive). Is it possible that that would help you in this case?

--clint
#2
09/14/2007 (2:59 pm)
I would really rather not have triggers =/

I guess I could do it, but, it isn't the most ideal solution to my situation. It is just to solve a tiny bug that occurs very rarely under extreme conditions and I would rather not rework my entire game to solve it =P

I will consider it though. Cheers