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 / How to make the program understand where the front of the 3d model is

Author
Message
jontepd
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: Sweden
Posted: 24th Feb 2009 15:18
So I've loaded a 3d model named "robot.3DS". The camera is positioned so that you see the model looking down on it from the top (like in a strategy game). You can move the model forward pressing the shift key, you can move the camera forward, back and side to side using the arrow keys. And you can also rotate the model to the left using the space key.

The problem is that by default the model is facing up. So if i press shift the model will go up (i.e where the front of the model is pointing). However, if i rotate the model to the left, so it faces somewhere between left and up, if i press shift it will still go up (i.e not where the front of the model is pointing). I've tried to fix this but i haven't really figured out how to do it so I'd really appreciate some help.



Here is the model of the robot if you want to try it out.

http://files.filefront.com/robot3DS/;13357282;/fileinfo.html
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Feb 2009 21:11
Use dbMoveObject to move it forwards

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
jontepd
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: Sweden
Posted: 24th Feb 2009 21:41 Edited at: 25th Feb 2009 10:44
Solved

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-30 19:35:23
Your offset time is: 2024-09-30 19:35:23