Page 1 of 1

Node Collision and effect

Posted: Wed May 16, 2007 2:15 pm
by nomis
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:

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();
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

Posted: Sat May 19, 2007 4:21 am
by nomis
Bump :(

Posted: Wed May 23, 2007 5:07 am
by nomis
Last bump, this is the final part needed for the game which is due tomorrow >_>

ANY help would be great guys!

Posted: Wed May 23, 2007 8:40 am
by hybrid
I think this is s stepping value, basically an internal value for the collision function. It might be useful to change the value, for whatever purpose. But is does not seem to be related to character sliding.
The value is finally stored as follows: veryCloseDistance = colData.slidingSpeed
I don't know the exact behavior of this parameter, though, otherwise I'd have documented it already.