Triggers and HitReports

Chebastian

28-11-2007 15:46:15

Hi!

Im trying to implement some basic sorts of "triggers" in our game.
So basicly what i need to know is where the player is colliding with his hitbox,
say if the player is currently colliding with his feet(bottom of box) he will be able to jump.
Or if he currently is intersecting a ladders col.box he is able to "climb".

I'v looked on the forum but feel that i need more info on how these classes work, Trigger, Intersection and CharacterHitReport.

Chebastian

28-11-2007 17:07:00

This is my intersection code sofar.

mIntersect = new NxOgre::Intersection(a->getScene(), new NxOgre::SimpleBox(Ogre::Vector3(5,5,5), b->getGlobalPose()), NX_ALL_SHAPES);
bool intersects = false;
for(NxOgre::Actor* actor = mIntersect->begin(); actor = mIntersect->next();)
{
if(actor == a)
intersects = true;
}
delete mIntersect;
return intersects;

Chebastian

28-11-2007 21:41:53

it detects a intersection between these two actors.
(the two boxes not the floor)

even tough they are not intersecting.

Aiursrage2k

28-11-2007 23:59:27

Triggers are excluded from raycasts and sweep tests