Tom Forsyth on Nostr: Oh that's a fun bug! So Unity has both Matrix4x4 and float4x4, and the have slightly ...
Oh that's a fun bug! So Unity has both Matrix4x4 and float4x4, and the have slightly different syntax, but close enough. The big difference is float4x4 is significantly faster. So a lot of people replace one with the other - happy.
BUT....
To do matrix multiplication with Matrix4x4, you do a = b*c.
To do it with float4x4 you have to do a = math.mul(b,c)
OK whatever. The problem is that a=b*c COMPILES FINE. It just does the componentwise multiply is all.
W
T
F
people.
Published at
2024-02-17 02:24:31Event JSON
{
"id": "4146932908713880ad169ea3419a4d86ada301afd85ba58b7e435d1af1a9b922",
"pubkey": "59c5c61181eb766e339fd4da8594510cc8ee73ae967fe4298fafc81c718619d4",
"created_at": 1708136671,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.gamedev.place/users/TomF/statuses/111944444925554410",
"activitypub"
]
],
"content": "Oh that's a fun bug! So Unity has both Matrix4x4 and float4x4, and the have slightly different syntax, but close enough. The big difference is float4x4 is significantly faster. So a lot of people replace one with the other - happy.\n\nBUT....\n\nTo do matrix multiplication with Matrix4x4, you do a = b*c.\n\nTo do it with float4x4 you have to do a = math.mul(b,c)\n\nOK whatever. The problem is that a=b*c COMPILES FINE. It just does the componentwise multiply is all.\n\nW\nT\nF\npeople.",
"sig": "21c63558e690e8aeb4d890fa52481066e78f33cd14cd65a89bb335334e07850b35f52a23a247a5f3095e68e5331a94975d8753b2a9300ff4a0d6cd6d09e41e1d"
}