Node Collision and effect
Posted: Wed May 16, 2007 2:15 pm
Hi All,
I'm making a racing game and it's almost finished! One of the few things left is collision with walls. By default in irrlicht they work:
The commented line is a variable "slidingValue" but in the documentation it simply says "DOCUMENTATION NEEDED." By the sounds of this it's exactly what I want, at the moment it seems that you go at full speed even if running diagonally into a wall. I want it so you only go say 30% off full speed or something similar.
When I set slidingValue to 1.0 it stops whenever the car touches the wall, same with 0.5 but depending on the angle. 0.2 seem to just bounce off the wall but very jerkily.
Any help would be great!! I've used the search but can't find anything..
Nomis
I'm making a racing game and it's almost finished! One of the few things left is collision with walls. By default in irrlicht they work:
Code: Select all
//set banana collision detection
ISceneNodeAnimator* animCol = smgr->createCollisionResponseAnimator(
selector, bananaNode, vector3df(30,34,20),
vector3df(0,-1,0),
vector3df(0,0,0)
//,0.0021f // collcoll
);
bananaNode->addAnimator(animCol);
animCol->drop();
When I set slidingValue to 1.0 it stops whenever the car touches the wall, same with 0.5 but depending on the angle. 0.2 seem to just bounce off the wall but very jerkily.
Any help would be great!! I've used the search but can't find anything..
Nomis