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.

3 Dimensional Chat / Matrix4 - Rotation Of the X, Y, Z

Author
Message
LightningSky
15
Years of Service
User Offline
Joined: 22nd Feb 2010
Location:
Posted: 13th Jan 2011 03:46
So, I perform the following command:

ROTATE Y MATRIX4 MyMatrix, (RotAngle# * (3.141592/180))

then apply the matrix to my Object through EZROTATE, I get an object that rotates on the Y axis perfectly.

However, I then perform this statement:

ROTATE X MATRIX4 MyMatrix, (PitAngle# * (3.141592/180))

and then apply the matrix to my Object I lose the Y rotation of the matrix. It's as if it gets set back to 0 degrees.

If I perform the following:

ROTATE YPR MATRIX4 MyMatrix, (RotAngle# * (3.141592/180)), (PitAngle# * (3.141592/180)), 0

it works just fine.

I'm just curious. Is EZROTATE doing something to the Matrix that might be causing it? If not for EZROTATE I don't know (yet) how I'd apply a Matrix4 back to an Object.

Any thoughts?

TIA

- A man from nowhere, prophesized to fail, blazed beyond the brightest of them all.
LightningSky
15
Years of Service
User Offline
Joined: 22nd Feb 2010
Location:
Posted: 14th Jan 2011 06:03
So I've been working and working trying to understand the Matrix4 aspect and I'm running into road blocks. I have found that I cannot rotate one axis without losing the other two. I have to use the ROTATE YPR MATRIX4 command. Has any else seen this?

Second, I cannot get the TRANSLATE MATRIX4 command to "move" the object IF I rotate it. No matter what ROTATE statement I use YPR or just the single axis Matrix4 commands, I lose the TRANSLATE parameters.

I can't helping feeling that this is some kind of bug with the MATRIX4 commands. Unless someone can prove it wrong that is. I've searched this forum, and I've searched out in the "CLOUD" for answers to this.

Is someone using the MATRIX4 statements to move 3d objects effectively or have you just resolved to using 4 VECTOR3/VECTOR4 commands instead?

Please don't tell me that MATRIX4 is only for Shaders, I've seen that statement on several posts. I've got to believe it was meant for more than just that.

Aside from using EZRO_SetupFromDBMATRIX4 in combination with EZRO_ApplyToObject, is there any other way to get a MATRIX4 plugged into an Object?

Thanks for your time in looking at this. I anxiously await someones evaluation of this. Be gentle

- A man from nowhere, prophesized to fail, blazed beyond the brightest of them all.
henry ham
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: way way out there
Posted: 14th Jan 2011 09:33
i think you have posted in the wrong part of the forum mate this is the 3d modeling area.

cheers henry

lazerus
17
Years of Service
User Offline
Joined: 30th Apr 2008
Location:
Posted: 14th Jan 2011 12:11
Seems where getting alot of coding questions of late

LightningSky
15
Years of Service
User Offline
Joined: 22nd Feb 2010
Location:
Posted: 15th Jan 2011 00:34
My apologies, I'll move / re-enter the post under the coding section.

- A man from nowhere, prophesized to fail, blazed beyond the brightest of them all.

Login to post a reply

Server time is: 2025-05-14 16:57:28
Your offset time is: 2025-05-14 16:57:28