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 with player movement

Author
Message
mususama
15
Years of Service
User Offline
Joined: 7th Jun 2009
Location:
Posted: 7th Jun 2009 09:46
hi.. i am very new to dbp and i am attempting to write a 3d game. however i have come upon some troubles with player movement. here is the code i have written it may be messy because it is my first.

i can get left\right rotate to work but forward\ back, i think it has something to do with the xrotate object not sure

sorry in advance if this question has been asked but i couldnt find it on the forum
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 7th Jun 2009 12:55 Edited at: 7th Jun 2009 12:56
i think you are right, it has to do something with the xrotate command. what actually happens here is that you rotate your object in such an angle that it faces the sky. then you try to move it, and then it moves to the sky, because that's the way it's facing. then you position it on a certain height on the matrix, so it just looks like it didn't move. so if you delete that line, it just works ok. if you still want the object to face the sky, but you want it to move too, you can use this command:

fix object pivot 5

place it directly below the xrotate object command and it should work ok. and something else, i would remove this line too:

move camera z#+10

i don't know what it does, but it makes the camera move very weird.

*ding ding*
mususama
15
Years of Service
User Offline
Joined: 7th Jun 2009
Location:
Posted: 7th Jun 2009 14:06
yay it works thanks bobbel

Login to post a reply

Server time is: 2024-11-24 06:47:48
Your offset time is: 2024-11-24 06:47:48