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.

DarkBASIC Discussion / Matrix tilting

Author
Message
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 18th Jul 2006 20:55
I have noticed quite a few people needing some code that tilts an object according to the matrix. well here's the code for it that i use in my tnak sim. in needs a bvit of fine tuning but it works well enough.



hope you find it useful

OMG It's the Wilderbeast
Canadian Bush Air | Bush flying at its best! |http://www.canadian-bush-air.tk
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 19th Jul 2006 23:34
Looks good! Now all you have to do is make that into a function and we'll be all set

My Functions: Mine
Post yours: Post
Krilik
19
Years of Service
User Offline
Joined: 16th Mar 2006
Location: Arizona, USA
Posted: 20th Jul 2006 02:31
Heh, I've been meaning to attempt to write some similar code for future games. You've saved me some work.

I noticed a little problem though. Don't know if this happens to you, but the object will pitch in the wrong direction. Easily fixed though.

Just need to change this:


To this:




I also put it into a quick function to use with any object and matrix.


UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 20th Jul 2006 19:14
Nice. This will be very helpful! Good job

The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 21st Jul 2006 19:28
Thanks for that!

I edited it from my tank code. glad i could help

OMG It's the Wilderbeast
Canadian Bush Air | Bush flying at its best! |http://www.canadian-bush-air.tk
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2006 13:20
Yay it's a function now! I was too lazy to do it myself lol.

The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 3rd Aug 2006 14:08
no problems. i shall be releasing a db environment addon soon, so keep your eyes peeled!

check out my thread for more info. (the wilderbeast)

Uber_Soldiers | Worms 4 clan | http://www.freewebs.com/uber_soldiers
Terrain
18
Years of Service
User Offline
Joined: 13th Aug 2006
Location:
Posted: 13th Aug 2006 14:53
hey im just asking cus im new here i had no where else to post this so i posting it here since i can't post my own yet kinda gay...anyone i was wondering if i could load my on Terrain out of a programe i got called t.ed and get a object to move around it

can anyone help plz

Login to post a reply

Server time is: 2025-05-25 08:36:18
Your offset time is: 2025-05-25 08:36:18