Why Doesn't this World

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Sean Doherty
Posts: 40
Joined: Tue Jul 20, 2004 12:21 am

Why Doesn't this World

Post by Sean Doherty »

The new location is always (0,0,0)? Even though the velocity is set; what am I doing wrong?

Code: Select all

// Move the Ball's Position.
		vector3df vecPosition = pIAnimatedMeshSceneNodeBall->getPosition();
		vector3df vecVelocity = vector3df(-5,0,5);


		bool outFalling = false; 
		core::triangle3df triout; 
		vector3df vecNewLocation;

		vecNewLocation = pISceneCollisionManager->getCollisionResultPosition(s, 
										  	  								 vecPosition, 
																			 vector3df(10,10, 10), 
																			 vecVelocity, 
															                 triout,
															                 outFalling, .0005f, vector3df(0, 0, 0));

		if (vecNewLocation != vecPosition + vecVelocity) 
		{ 
			pIAnimatedMeshSceneNodeBall->setScale(vector3df(20,1,1));			

		}
Sean Doherty, BCS
www.FreelanceGames.com
Sean Doherty
Posts: 40
Joined: Tue Jul 20, 2004 12:21 am

Post by Sean Doherty »

Works; must use triangles from the world; not the ball. DUH
Sean Doherty, BCS
www.FreelanceGames.com
Post Reply