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 / [LOCKED] EZRotate Basic Problem - Specific Angle on Global Axis

Author
Message
Blanked
20
Years of Service
User Offline
Joined: 27th Mar 2004
Location: UK
Posted: 21st Aug 2006 03:20
I apoligize if this is in the wrong forum or has been answered before (I have searched though) but I've run into some problems with EZRotate.


In the code Snippet Below I wanted a ship to rotate towards a certain angle (rotate 90 degrees to the left to roll etc) when a key is pressed, I encountered a few problems with DarkBasics Eular angles as it caused the ship to rotate in very awkward angles when X, Y and Z rotations where mixed.

I went ahead and used EZrotate which has Global Roatation, unfortunately the command to rotate doesn't seem to allow me to rotate towards a specific angle and insted(as shown below) causes the ship to rotate constantly

Long Story short:

Is it possible with EZRotate-Basic to rotate on the global axis to a specific angle?

Thank you in advance for assistance

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 21st Aug 2006 16:01 Edited at: 21st Aug 2006 16:02
`Setup EZrotate with unit's current Rotation angle
EZro_SetEuler ax#,ay#,az#
`Setup EZrotate with unit's Position
EZro_SetPos x#,y#,z#
`apply turn data and speed
EZro_turnto targetx#,targety#,targetz#,turnspeed#
`Find New Angles
EZro_FindEuler
`Apply to unit
ROTATE OBJECT obj,EZro_GetEulerX(),EZro_GetEulerY(),EZro_GetEulerZ

something like this ?

the author is also an extremly nice person that can help you out alot in the right forum section for plugins dll
Blanked
20
Years of Service
User Offline
Joined: 27th Mar 2004
Location: UK
Posted: 21st Aug 2006 17:12 Edited at: 21st Aug 2006 17:13
Thanks You

Unfortunately this doesn't seem to be what I'm looking for. By the looks of things, this would cause the object to point towards a specific point.

What I want is for EZrotate to behave like this:



On a Global Axis

But thank you for your help

I'm going to post this in the DLL Forum.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 22nd Aug 2006 15:15
locked for double posting.
this thread is open in dll forum

Science, Mathematics, and Physics do not lie - only people do.

Login to post a reply

Server time is: 2024-11-26 14:21:42
Your offset time is: 2024-11-26 14:21:42