Game Development Community

Collision without Physics

by JohnT · in Torque X 2D · 06/22/2008 (1:52 pm) · 3 replies

I may be way off in my understanding of how things are working under the hood of TorqueX but from what I can tell in order to get collisions to register with other objects, Physics gets involved. This would be fine except that I have a lot of enemies on screen and the physics is really slowing things down on the 360.

Does anyone know a way to disable the physics but still permit collisions or is there a better way to handle this that I'm not seeing?

Thanks for any help.
John

#1
06/22/2008 (2:40 pm)
How many enemies are you talking about? Are you sure its the physics slowing it down, and not the graphics?
#2
06/22/2008 (2:47 pm)
I'm trying to get around 30 on screen at a time. The models are very simple in geometry and render quickly as long as I don't include the RigidComponent. This appears to be the same problem in the Physics example in the 3D Demo with the cubes. Even on a PC it's not exactly quick but on a 360 you might as well take a nap.

My hope is to just detect that a projectile has collided with an enemy and then let a custom component I'm writing pickup the collision and destroy the object without physics getting in the way.
#3
06/22/2008 (3:00 pm)
Just take a look at the T3DTriggerComponent which looks like it does what you want to do, and then some.. It looks like it should be as simple as inherting the t3DRigidComponent, and overriding the onCollisoinDelegate.



Will