So.......
I have my decal how I want it in the sim, with the exception of needing to scale it a bit and rotate it through 90 degrees too.
So for the scaling matrix I have:
[2.25 0 0]
[0 2.25 0]
[0 0 1]
The rotation matrix I require is for a 90 degree rotation clockwise, which is:
[0 0 1]
[0 1 0]
[-1 0 0]
However, when i multiply them together and input my resulting matrix to the .bin file, I lose scaling in one axis but the object rotates exactly how I desire. The result matrix I have (which may of course be totally wrong) is:
[0 0 0]
[0 2.25 0]
[-1 0 0]
Please, could someone help rescue me from trig calculations and insanity.
Thank you.
Multiplying matrixes for child objects
Moderator: Moderators
Multiplying matrixes for child objects
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
- JLD95
- Well Established Forum Member
- Posts: 623
- Joined: Sun Jan 22, 2012 12:06 pm
- Location: Pontoise near Paris, FR
- Contact:
Re: Multiplying matrixes for child objects
Hi
Matrix result is:
[0 0 2.25
0 2.25 0
- 1 0 0]
Matrix result is:
[0 0 2.25
0 2.25 0
- 1 0 0]
Jean-Luc - French user
PC: MSI Z87-G45 - Core i5 4670K - 16Go RAM - Win7 64bits - KFA2 GTX 1080 ExOC - SSD system Samsung 840 240Go + SSD Steam SanDisk UltraII 480Go - Display 27'' 1920x1080
PC: MSI Z87-G45 - Core i5 4670K - 16Go RAM - Win7 64bits - KFA2 GTX 1080 ExOC - SSD system Samsung 840 240Go + SSD Steam SanDisk UltraII 480Go - Display 27'' 1920x1080
Re: Multiplying matrixes for child objects
Okay, thanks for your help. If you know any easy tutorials or can explain easily where I went wrong that would be great. As always, once I know I know, but when I don't know I get very cross.JLD95 wrote:Hi
Matrix result is:
[0 0 2.25
0 2.25 0
- 1 0 0]
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
- Kernow2
- Well Established Forum Member
- Posts: 874
- Joined: Tue Nov 30, 2004 7:50 pm
- Location: Deepest Darkest Devon
Re: Multiplying matrixes for child objects
This has worked for me on the very few times I've investigated matrices..
http://www.mathsisfun.com/algebra/matri ... lator.html
Just tried your example it it worked ok!
Why not give it a try?
Regards,
Kernow2/Graham
http://www.mathsisfun.com/algebra/matri ... lator.html
Just tried your example it it worked ok!
Why not give it a try?
Regards,
Kernow2/Graham
-
scefhwil
- Well Established Forum Member
- Posts: 907
- Joined: Tue Dec 04, 2001 12:00 am
- Location: Bristol, England
Re: Multiplying matrixes for child objects
Interesting thread! Have pondered about how to do this with child objects but never got around to it. So, how does the resultant 3x3 matrix get translated into the 4x4 in the blueprint?
Re: Multiplying matrixes for child objects
The 3x3 is just numbers that go into positions 1,2,3,5,6,7,9,10,11 in the 4x4 matrix. The 3x3 is in the top left corner of the 4x4.scefhwil wrote:Interesting thread! Have pondered about how to do this with child objects but never got around to it. So, how does the resultant 3x3 matrix get translated into the 4x4 in the blueprint?
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
-
scefhwil
- Well Established Forum Member
- Posts: 907
- Joined: Tue Dec 04, 2001 12:00 am
- Location: Bristol, England
Re: Multiplying matrixes for child objects
Quite simple then. Thanks.