Posted By: b_102373
Tweaking Newton - 03/21/05 17:26
Hi,
For anyone who has used the Newton Physics engine car demo. What did you find as a good weigh, mass and tourque level?
Cheers
Posted By: MatAllum
Re: Tweaking Newton - 03/26/05 10:32
>>weigh
I use around 35 for The Racing World.
>>mass
As far as I know, same thing. 35
>>torque
CarMaxTorque? Well, I don't know anymore because I wrote my own code system that doesn't even use that, but before, I used somewhere around 250 or 300.
Cheers
Posted By: Braxton
Re: Tweaking Newton - 03/26/05 15:04
On that demo do you know how to make a good 3rd person camera?
Posted By: MatAllum
Re: Tweaking Newton - 03/27/05 22:33
Well, a "decent" 3rd person, at least...
In MOVE_CAMERA, change
cam_ang.pan=<whateveraboutmouse>;
cam_ang.tilt=<mickey.z or something>;
to
cam_ang.pan=(p_vehicle.pan-180);
cam_ang.tilt=16;
16 could also be 25, 30, or any number. Play with it to get the desired effect.
Actually, I am looking for a decent 3rd person camera for the car, too - one that lags behind just a little bit in rotation, like pro racing games. For instance, driving straight would mean the camera is just pointing straight ahead. However, if you turn a fast corner, you can see a little of the side of the car as well (but only a little; the rotation is limited to some extent). If you slow down, the camera slowly moves back to pointing straight ahead.
How would I do this?
Posted By: Braxton
Re: Tweaking Newton - 03/28/05 05:48
Thanks MatAllum! That worked great no all i need is a flip the car so it isn't upside down.
Posted By: Nardulus
Re: Tweaking Newton - 03/29/05 01:08
Hi Matt,
You are asking for LERP and SLERP.
You use LERP to make the camera drag a little behind the car, then catch-up. This helps give a feeling of acceraltion.
SLERP, this allows the car to turn, you see it turning, then the chase camera follows the turn angle.
I did a Google search "LERP" and "SLERP" and fund this article I hope this helps.
www.answers.com/topic/linear-interpolationThis should be relatively straight forward to add to your 3DGS camera code.
Good luck,
Ken
Posted By: MatAllum
Re: Tweaking Newton - 03/29/05 10:13
I'm sorry to say that I do not understand a word of it. Would anyone be so kind as to provide an example of how to lurp slurp... er, lerp and slerp?
For the reset-car function, you'd have to set a temporary vector (pan, tilt, and roll of car, I guess), find a variable for the car body (NewtonGetBody), and set NewtonBodySetTransform (body, temp vector). I don't know how to explain this, you ought to consult Agent_Smith's Car Tutorial II, it covers resetting after crashes. My system is based on his.
Posted By: Braxton
Re: Tweaking Newton - 03/29/05 10:17
His site shut down, so I can't get the tut... would you be so kind as to upload it to a site so that I can get it and learn from it, please?