Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Angle of an object at a terrain

Author
Message
Thunder21
15
Years of Service
User Offline
Joined: 4th Dec 2008
Location:
Posted: 4th Dec 2008 17:38
Hey I\'m a beginner in Dark GDK and I want an object having the same angle as the terrain. On the x axis of the terrain I\'ve already done it. And it works very good. But on the y axis it doesn\'t work really good. I have an attachment; you can test my game then you will see what i mean. If you drive to the right hill and you turn the object around oneself at the half height of the hill, the object adapt themself at the terrain. If you do the same at the left hill, the object only adapt the angle only at 180° of turning it. For better unterstanding, watch my code:



I hope you know what I mean.I ask, if the limb is in front or behind the object.Apposite the angle of the object is positive or negative.But on the X axis I don\'t need this query and it works perfect.

Hope you can help me and you understand my baaad english.

Thunder21

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Dec 2008 16:20
There is a library called EZRotate that could help you with this.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Dec 2008 04:56
Ground height and arctan function should be all you need.

Login to post a reply

Server time is: 2024-09-30 13:17:17
Your offset time is: 2024-09-30 13:17:17