nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nel] Collisions: sliding


From: Pascal LECLERC
Subject: [Nel] Collisions: sliding
Date: Fri, 16 Apr 2004 11:40:58 +0200

Hi

I have two Move Primitives, one animated by an ai engine, one controlled by the 
player. When I apply a slide reaction on both, the two cylinders go through 
each other as if there was no collision. However, when I apply a reflexion 
reaction with the default absorption on both, the colliding reaction occurs as 
expected. The same way, the stop reaction works perfectly well. A reflexion 
with any other absorption value than the default one gives the same result as 
the slide reaction, or very close, so it doesn't work as expected and the 
cylinders cross.
Another strange behavior: when my two cylinders have the slide reaction, and if 
i try to collide into the other just walking on the ground, it goes through, 
but if I try to collide when in the same time sliding on the ground collision 
mesh, it works perfectly well, ie the two cylinders collide as expected...

Here is the initialisation code:

  NLPACS::UMovePrimitive* movePrimitive = createMovePrimitive(mobile);
  
movePrimitive->setPrimitiveType(NLPACS::UMovePrimitive::TType::_2DOrientedCylinder);
  movePrimitive->setHeight(size.z);
  movePrimitive->setRadius(radius);
  movePrimitive->setGlobalPosition(Vector::toNelCVectorD(entity.getPosition()), 
collisionWorld);
  movePrimitive->setObstacle(true);
  movePrimitive->setTriggerType(NLPACS::UMovePrimitive::NotATrigger);
  movePrimitive->setReactionType(mobile ? NLPACS::UMovePrimitive::Slide : 
NLPACS::UMovePrimitive::DoNothing);


Thank you for your help.

g




reply via email to

[Prev in Thread] Current Thread [Next in Thread]