Game Development Community

Bug:Continually calling onCollison function

by Doug Barnes · in Torque X 2D · 09/26/2007 (6:09 pm) · 1 replies

Hey everyone,
I'm having a bit of a problem with a custom collision function that I wrote. Ok here is the code
static void OnCollision(T2DSceneObject ourObject, T2DSceneObject theirObject, T2DCollisionInfo info, ref T2DResolveCollisionDelegate resolve, ref T2DCollisionMaterial physicsMaterial)
        {
            //calls to delete marbles on every collision
                PlayerControlComponent instance = new PlayerControlComponent();
                instance.LoopMarbles();
        }
The problem that I'm having is that the function will sometimes be called when there are no collisions occurring, any help figuring out why the function keeps getting called or even more information on how collisions work in TorqueX would be greatly appreciated.

thanks in advance,
Doug

#1
09/27/2007 (5:51 pm)
Never mind I was able to figure it out.