Game Development Community

Multiple collision resolution

by Vishal Bhanderi · in Torque X Platformer Kit · 12/24/2008 (1:39 pm) · 0 replies

Hi guys,

What i'm trying to do is let the ActorComponent handle the collisions with the ceiling, walls etc. The problem is below.

public virtual void ResolveActorCollision ..

// check if it's a ground surface
bool groundSurface = info.Normal.Y <= _maxGroundNormalY;

// check if it's a ceiling surface
bool hitCeiling = info.Normal.Y >= maxCeilingNormalY;

What happens is that when this method is called it resolves the collision with one sceneObject at a time. So even though the actor is touching both the ground and ceiling, only the ground one stays true.

Does anyone have a way around this, so both bools stay true when colliding with both ground and ceiling?

Thanks
Vishal