SetMatElement?

Blitz3D Forums/Blitz3D Programming/SetMatElement?

JoshK(Posted 2004) [#1]
Anyone have the offsets for the entity matrix? I want to see if it is possible to directly alter the matrix. If so, a ShearEntity() command could be added to skew meshes without altering the vertex coordinates. This is very useful for referenced static meshes.


Bot Builder(Posted 2004) [#2]
This would be handy.. You probably already knw this but you could probably figure it out by starting at the entity handle of a cube (scaled by 3.4 on the X axis) in memory and loop through a bunch of bytes aftrer it (maybe 300), reading in floats. When the value is 3.4, debuglog position and 8 more floats. Then, repeat with different values. There should be an offset common to each test.


fredborg(Posted 2004) [#3]
It isn't possible. As far as I can tell the matrix is recalculated from position, rotation, and scale values. Additionally it is a 3x4 matrix without the shear/projection column.

It is located at entity+88 (and again at entity+156), but is only filled if you use GetMatElement.


DJWoodgate(Posted 2004) [#4]
It might be me, but I see some interesting things going on at entity+176 onwards (for mesh entities) in version 1.87. I am a bit uneducated when it comes to matrix stuff though, so it may or may not be of much help.