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 / 3d movement

Author
Message
Cemetery Ridge
17
Years of Service
User Offline
Joined: 23rd Mar 2007
Location:
Posted: 25th Mar 2007 05:58


the yAng is the vertical camera angle for looking right to left
xPos is the left to right movement and
zPos is the forward to backward movement

what the problem is if i have the code when you move in the directions normally it works fine. but when you rotate the camera like 90 degrees the forward/ backward keys make the camera move right to left


so what i did was use trig sin and cos to take the yAng to get the direction the player should move in the z and y directions.
it should work but it doesnt. Please its complicated but i really need help.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 25th Mar 2007 08:17
Why not simplify it by using code like:

Pitch camera up 1

or

Move camera 1

Or, put this code in your do loop:

control camera using arrowkeys 1,1

Is this the end product you're looking for?




"There will always be evil, for, without evil, the good shall lose their virtue."
Cemetery Ridge
17
Years of Service
User Offline
Joined: 23rd Mar 2007
Location:
Posted: 26th Mar 2007 00:20
ok that might work but i need look up/down left/right and walk forward/backward and strafe
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 26th Mar 2007 06:49
You need to put forth some effort. If you could narrow you question to why some command isn't doing what you thought it should, people would be more inclined to think you're actually trying. If you need help getting started, you should do some tutorials.

"There will always be evil, for, without evil, the good shall lose their virtue."
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 27th Mar 2007 02:02 Edited at: 27th Mar 2007 02:05
Saw this, thought of you...

Read it, Try it, Learn it, Do it.



From:
http://forum.thegamecreators.com/?m=forum_view&t=102851&b=6&p=0
By:
Zombie 20

"There will always be evil, for, without evil, the good shall lose their virtue."

Login to post a reply

Server time is: 2024-11-25 22:39:51
Your offset time is: 2024-11-25 22:39:51