Qbasicnews.com

Full Version: Turning [right left] problems in 3D world!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello All!
I'm trying to make 3D 1. view shooter!
when I want to go forword: z.center = z.center + 1
straight left: x.center = x.center + 1
etc...

My problem is this:

When I want to turn right or left how can I do that? For example if I have only one cube in my 3D world, when I want to turn right, I need my cube to go x.center = x.center - 1 and I need it to rotate a little! I have no idea what values do I need to use to turn right or left. Everything else works perfect!!! Are there any formulas for turning right/left? I know how to rotate my cube with theta and phi, but how can I turn!!!??? I hope you understood me! Thank you!
Common!!! Haven't anyone ever created 3D 1. view shooter or some lybirinth game???
well, you need to setup some view-angle variables.

One for x, y, and z axis.

the x will be your turning, y will be your look-around, and z your extra zoom.

From there, use rotation formulas from center (playerx, playery, playerz)

Oz~
Rotate your cube on your Z-axis.

Read some tutes.
Thank you guys!
Do you know any good 3D tutorial that explains navigation into 3D world? Thank you!
Its ok rel....we'll get through this
:rotfl:

@Yosuke_ : if youve never dabbled with 3d before, its best to mess around w/it for a while before starting into a project

Oz~
Thank you! But in thous tutorials there isn't explained how to navigate into 3D world!!! I know how to rotate objects with theta, phi, what does all thous coordinates do, but is this so hard that no one have posted a tutorial how to TURN right and left???

For example I have a cube!
Right now I have made that I can go forword, backword, straight left, straight right.

When I press (<-) button on my keyboard I don't want my cube to just go straight right , I need that kind of effect like I'm (my camera) is turning 90 degrees in my 3D world!

Doesn't anyone know how to do this?
Ok, so you know how to rotate an object, right. Now you want a 'camra-effect'

When you rotate the camra, add the camra position coordinates to the object.
Quote:use rotation formulas from center

Only now I get it! When rotating a cube, if I would be in center of it, it would create an effect that actually I am turning right/left all the time, not the cube! Thank you!
Pages: 1 2 3