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.

Newcomers DBPro Corner / Help making object inclination

Author
Message
ZioNz
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 5th Sep 2003 03:32
Hi, i made a code to control an object in a matrix, im using "get ground height" to keep the object in ground but the problem is when you take an elevation, i can't make the object to inclinate.I added the code im using now.

-
Watsisname
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Wales
Posted: 5th Sep 2003 04:11 Edited at: 5th Sep 2003 04:14
To get the angle of inclination, you need to use the get 'ground height command' at points around the object. There is something about this in the 'binary moon' tutorial at
[href] http://developer.thegamecreators.com/?f=t02/bm_tutorial_index
Lesson 08 - Landscape tilting is the one you want. This tutorial is quite useful for alot of things so it's worth a quick study sometime. Sorry I can't be more helpful, it's 1.00am here and I'm off to bed !!
ZioNz
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 6th Sep 2003 02:59
Hello, thanks for the info, i have read the tutorial and i tryed to copy the code that control the object inclination but i can't make it work, im using DBP maybe thats it...

This is the sub i made:



-
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 6th Sep 2003 03:19
I never tried this stuff in dbp(yet) but are you sure you want to rotate object? what about pitch?

again I never tried this so don't flame me, just thinking aloud

good luck

-RUST-
Watsisname
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Wales
Posted: 6th Sep 2003 18:46 Edited at: 6th Sep 2003 18:55
I think I found the problem - need to use a bit of trigonometry to find the correct inclination .

Here's the corrected subroutine :


I assume this is what you want. As CattlerRustler said, there are other ways of doing this, although I'm not entierly sure what's best.

Another thing - Does your code run slow on your computer also? For so few lines, it doesn't half crawl along. Maybe something to do with having a position object command in the main loop , although I am using DBC.

Oh well, hope that's helped!

Login to post a reply

Server time is: 2024-11-10 17:13:24
Your offset time is: 2024-11-10 17:13:24