Turning [right left] problems in 3D world! - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: Turning [right left] problems in 3D world! (/thread-5042.html) |
Turning [right left] problems in 3D world! - Yosuke_ - 11-12-2004 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! Turning [right left] problems in 3D world! - Yosuke_ - 11-13-2004 Common!!! Haven't anyone ever created 3D 1. view shooter or some lybirinth game??? Turning [right left] problems in 3D world! - Oz - 11-13-2004 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~ Turning [right left] problems in 3D world! - relsoft - 11-13-2004 Rotate your cube on your Z-axis. Read some tutes. Turning [right left] problems in 3D world! - Yosuke_ - 11-13-2004 Thank you guys! Do you know any good 3D tutorial that explains navigation into 3D world? Thank you! Turning [right left] problems in 3D world! - relsoft - 11-13-2004 *sigh.... Chapter 1 to 4 http://rel.betterwebber.com/junk.php?id=21 chapter 5 http://www.petesqbsite.com/sections/express/issue2/#3d Turning [right left] problems in 3D world! - Oz - 11-13-2004 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~ Turning [right left] problems in 3D world! - Yosuke_ - 11-14-2004 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? Turning [right left] problems in 3D world! - Oz - 11-15-2004 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. Turning [right left] problems in 3D world! - Yosuke_ - 11-15-2004 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! |