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 / YROTATE OBJECT Issue

Author
Message
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 20th Jun 2007 23:56
Hey, I'm just trying to get a cube to move around like an airplane or spaceship, just for something to do. I read in another thread that:

Quote: "your camera wont follow right if u use turn object right/left .

u should use yrotate object instead.

i had this problem when i 1st started using dbp."


by David iz cool.

I am getting three problems.

A. The cube won't pitch up/down while it's turning left/right.

B. I am trying to get the turn speed / pitch speed to increase if you hold the corresponding button longer. This isn't working.

C. The YROTATE OBJECT is working fine, but I am still having the above problem. Pitch doesn't work though. It just pitches at insane angles wildy, and I don't understand it.



I am getting some of this code from the "HELP ME (space game)" thread.

Thank you if you can help, I know I'm new to DarkBasic, but we all have to start somewhere.

Spotaru
17
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 21st Jun 2007 02:23
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 21st Jun 2007 08:11
The yRotate command is absolute. That is, when you give it an angle, it will rotate your object to the angle on the Y axis, absolutely. It won't turn it. If you're using this command you have to change the angle yourself.

The turn/pitch/roll commands do what they say - they turn the object on an axis.

I never use the yRotate command, because if you are dealing with the other axes at all then it will screw things up. I use EZRotate to do anything more complex than statically rotating an object. If I do rotate an object on the Y axis, I use 'Rotate object obj,0,yAngle#,0' It will save many headaches.

Unless you get EZRotate, I wouldn't use axis angles. Euler angles are very difficult to work with.


Come see the WIP!

Login to post a reply

Server time is: 2024-11-25 15:36:38
Your offset time is: 2024-11-25 15:36:38