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 / Moving relative to camera angle

Author
Message
Mr Niceguy
21
Years of Service
User Offline
Joined: 23rd Dec 2003
Location: The zoo
Posted: 15th Aug 2004 07:54
Hey everyone, I'm pretty new to Dark Basic, and I'm just trying to make a simple little game. I currently have my object move forward with the up key, backwards with the down key, and rotate left and right with the left and right keys. What I want to know is how I could make my object move left and right depending on the camera angle. Like if the camera was facing my object's back, and I pressed right, he would move to the right of the direction the camera is facing, instead of rotating to the right.

Thanks.
Stephen
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: Appalachians
Posted: 15th Aug 2004 08:32
Is this what your'e looking for?
Mr Niceguy
21
Years of Service
User Offline
Joined: 23rd Dec 2003
Location: The zoo
Posted: 15th Aug 2004 09:00
Just what I wanted! Thanks! Now, what would I put for up and down?
Stephen
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: Appalachians
Posted: 15th Aug 2004 10:07
Here you are.

Depending on how you make the camera follow the object, you may have to change the "move camera speed#*-1" in the "if downkey()" section.
Mr Niceguy
21
Years of Service
User Offline
Joined: 23rd Dec 2003
Location: The zoo
Posted: 15th Aug 2004 10:24
Alright! Thanks so much!

Login to post a reply

Server time is: 2025-05-25 13:39:02
Your offset time is: 2025-05-25 13:39:02