Node Collision and effect

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
nomis
Posts: 14
Joined: Wed May 09, 2007 5:54 am

Node Collision and effect

Post 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
nomis
Posts: 14
Joined: Wed May 09, 2007 5:54 am

Post by nomis »

Bump :(
nomis
Posts: 14
Joined: Wed May 09, 2007 5:54 am

Post by nomis »

Last bump, this is the final part needed for the game which is due tomorrow >_>

ANY help would be great guys!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply