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 / Object Rotation

Author
Message
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 8th Sep 2005 21:55
I am trying to make an object rotate. Here is what i have already -


and what i am actually trying to do is when the right key is pressed, the object rotates >>>> and when the left key is pressed, it rotates <<<<. This is basic movement which i am happy with but what would make it even better is if it went <<<<< and and rotated down a bit, if you know what i mean. Like an Aircraft when it moves left, it pitches left and down. Anyone know how to do this? I think its something simple but cant figure out how to do it.
Thanks

http://www.Bevansfunbox.com
Silent Knight
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: In Your Mind
Posted: 8th Sep 2005 22:09
im not exaclty sure what you are saying but try rotating along the z axis

Version--DB Classic
900 mhz AMD Athlon, 128 MB RAM,
16 MB NVidia Vanta gfx card, Windows ME System software
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 8th Sep 2005 22:28
zrotate object

That is the command use the same steps for yrotate and xrotate.

The help files would have helped. Haha get it.

Formerly known as SFLM.
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 8th Sep 2005 23:14 Edited at: 8th Sep 2005 23:14
Hm, its hard to eplain. When the up key is pressed, the aircraft pitches down and when the down key is pressed, it pitches up. I have the left and right key working as the front of the aircraft moves out left or right and because its moving it follows the path. What i want to do is be able to do is tilt the object. Just like rotate object but it doesent work becasue it moves up also. I have drawn a picture to try and help.

When the left and right key is pressed, it respresents the red arrows, the front turns out and the foward motion drives thru that path which makes it change direction.

What i want is to make the object rotate as in (Twist) when it moves off to one direction. This is represented by the green arrows. So when the left key is pressed, it twists left and the right wing sticks up in the air, and when the right key is pressed it twists right and the left wing is sticking up in the air.

Do you understand?

http://www.Bevansfunbox.com

Attachments

Login to view attachments
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 9th Sep 2005 01:05
Run this:

http://xoomer.virgilio.it/tiscap1/DBP/FlyTest_lite.zip

and let me know what you need more if it doesn't help

use arrow keys
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 9th Sep 2005 19:10
All i need to do is make it twist around left or right. There is too much to go through there and im sure its just a smiple command.

http://www.Bevansfunbox.com
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 10th Sep 2005 11:24
Lazy uh?

use the same model with this:


Limb 1 ( or limb 0 ) rotation is the only way to keep the object z rotation relative to its own axis (local rotation). zrotate object will use world angles, therefore when going East to West or viceversa, zrotate makes it pitch up or down.
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 10th Sep 2005 11:40
OK, I usually use turn object right and turn object left, but, you can use the rotate object thing, but, I really don't know what you want.

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 11th Sep 2005 23:28
Im trying to make it roll left and right. You know like wen a plane wants to fly off left, it rolls left and shoots off in that direction.

http://www.Bevansfunbox.com
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 14th Sep 2005 12:29 Edited at: 14th Sep 2005 12:31
so you want to roll your aircraft left or right if either of those 2 keys are pressed? then as it's levelling itself out, you want it to gradually turn to face it's new direction, until it's flat?

If so:



check for left key


check for right key


level out the aircraft


is this what you're after -- it's very difficult to actually determine what it is you're asking for

...maybe one day I'll finish a project
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Sep 2005 15:25
Scorpyo is correct.

If you are doing a flight sim program, then the DB rotate, pitch and roll commands will only do what you want to do correctly when your plane is flying in a 'Northerly' direction.

Think of it like this:

Once you turn the plane to say East or West, the commands don't take the heading of the plane into account - they are still based on the terrain below which hasn't been rotated.

This can result in the the nose coming up or going down when you want to roll left or right.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 14th Sep 2005 20:28
Actually trying the code I submitted, it doesn't work at all - sorry if you've tried to use it and had fun watching it all go wrong...

...maybe one day I'll finish a project

Login to post a reply

Server time is: 2024-09-24 03:27:33
Your offset time is: 2024-09-24 03:27:33