|
Re: Tweaking Newton
[Re: MatAllum]
#43149
03/26/05 15:04
03/26/05 15:04
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
Developer
|
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
On that demo do you know how to make a good 3rd person camera?
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Tweaking Newton
[Re: Braxton]
#43150
03/27/05 22:33
03/27/05 22:33
|
Joined: Jan 2005
Posts: 330 USA
MatAllum
Senior Member
|
Senior Member
Joined: Jan 2005
Posts: 330
USA
|
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?
|
|
|
Re: Tweaking Newton
[Re: MatAllum]
#43151
03/28/05 05:48
03/28/05 05:48
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
Developer
|
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
Thanks MatAllum! That worked great no all i need is a flip the car so it isn't upside down.
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Tweaking Newton
[Re: MatAllum]
#43152
03/29/05 01:08
03/29/05 01:08
|
Joined: Mar 2002
Posts: 1,835 Minneapolis, Minnesota, USA
Nardulus
Serious User
|
Serious User
Joined: Mar 2002
Posts: 1,835
Minneapolis, Minnesota, USA
|
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
|
|
|
Re: Tweaking Newton
[Re: Nardulus]
#43153
03/29/05 10:13
03/29/05 10:13
|
Joined: Jan 2005
Posts: 330 USA
MatAllum
Senior Member
|
Senior Member
Joined: Jan 2005
Posts: 330
USA
|
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.
|
|
|
Re: Tweaking Newton
[Re: MatAllum]
#43154
03/29/05 10:17
03/29/05 10:17
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
Developer
|
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
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?
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
|