| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Sit Flush on Terrain. | |
|---|---|
| Tweet Topic Started: Dec 1 2007, 09:38 AM (207 Views) | |
| Zedman3d | Dec 1 2007, 09:38 AM Post #1 |
![]()
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
How do i make an object sit on the terrain but slope with it too. I did get the code to make it sit on the terrain but i want the slope code. I think i need to use trig but dont know the functions needed.... Thank you.
|
| |
![]() |
|
| $pecter | Dec 1 2007, 12:04 PM Post #2 |
|
Elite Member
![]() ![]() ![]() ![]() ![]() ![]()
|
I don't know about setting the rotation variables in U3D but I do know about trig.
I would do this by finding the height of the terrain in front of the object and determining to slope from that. ![]() The tangent(tan) of the angle theta(θ) is equal to change in z(δy) change in x(δx) So in gamemaker
EDIT: Sorry, I used delta y when it should have been delta z
|
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |






![]](http://z1.ifrm.com/static/1/pip_r.png)




9:37 PM Jul 11