Scorch
11-03-2007 05:28:16
I have a ball that i'm pushing along the ground.
Its moving way slower than it should.
So I decided to see how fast it is really moving.
Problem is, the result says the velocity is 6 (which I assume is units per second).
But if I move another object (like the camera) at a rate of 3/second. The camera out-runs the ball at 2x the speed
by doing the following:
The camera out runs the ball every time.
I had to increase the velocity of the ball to 12, to match the camera speed of 3!?
oh, and I am calling
every frame.
Any ideas why 6 units per second in ogreNewt doesn't match 6 units per second in Ogre3d?
Its moving way slower than it should.
So I decided to see how fast it is really moving.
Vector3 vel = b->getVelocity(); // balls velocity
Vector3 hVel = Vector3( vel.x, 0, vel.z ); // balls horizontal velocity (ignoring climb and fall)
Real current_velocity = hVel.length();
cout << "Current Velocity is " << current_velocity << std::endl;
Problem is, the result says the velocity is 6 (which I assume is units per second).
But if I move another object (like the camera) at a rate of 3/second. The camera out-runs the ball at 2x the speed
by doing the following:
Vector3 moveVec(0,0,3 * evt.timeSinceLastFrame);
mCamera->move( mCamera->getOrientation() * moveVec);
The camera out runs the ball every time.
I had to increase the velocity of the ball to 12, to match the camera speed of 3!?
oh, and I am calling
newtWorld->update(evt.timeSinceLastFrame);
every frame.
Any ideas why 6 units per second in ogreNewt doesn't match 6 units per second in Ogre3d?