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 / Rotating objects with arrow keys

Author
Message
Clbembry
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Minnesota
Posted: 3rd Feb 2007 04:19 Edited at: 3rd Feb 2007 17:00
How would I rotate my object with an arrow key?
This is what I tried, but it doesn't work
I'm using DBC
Oh and by the way, how do I use the code snippet thing?







Another question I have is how do I make a 3rd person camera. When I searched around I found some threads, but I didn't get what they are saying. The only major problems I have with the 3rd person camera is one, I want to camera to always point at my object. And two, I don't know how to make it so when I have a matrix my camera and object move to the matrices height. All help would be appreciated!
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 3rd Feb 2007 10:36
first of all you need a loop, try this, and by the way this is how you use code snippets
[ code ] code snippet here [ /code ] (remove spaces)

btw what else is wrong? let me know and umm this way might be more convenient but i wouldn't count on it

instead of turn object left i use this



then for rightkey replace dec with inc. make sure you set a# as a variable up the top of your code though

~Kieran
Clbembry
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Minnesota
Posted: 3rd Feb 2007 15:13
when I do that my scree turns white and I can't move my mouse? Is there something wrong with my computer?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Feb 2007 15:27
Change this part of the code:


to this (insert one extra line):


Clbembry
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Minnesota
Posted: 3rd Feb 2007 15:34
Yeah! Thank you so much both of you!
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 3rd Feb 2007 21:46
oh sorry chewy and ian, i forgot to put sync

~Kieran

Login to post a reply

Server time is: 2024-09-25 17:30:48
Your offset time is: 2024-09-25 17:30:48