Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turning [right left] problems in 3D world!
#1
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!
Reply
#2
Common!!! Haven't anyone ever created 3D 1. view shooter or some lybirinth game???
Reply
#3
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~
Reply
#4
Rotate your cube on your Z-axis.

Read some tutes.
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#5
Thank you guys!
Do you know any good 3D tutorial that explains navigation into 3D world? Thank you!
Reply
#6
*sigh....

Chapter 1 to 4
http://rel.betterwebber.com/junk.php?id=21

chapter 5

http://www.petesqbsite.com/sections/express/issue2/#3d
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#7
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~
Reply
#8
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?
Reply
#9
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.
Reply
#10
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)