Sly 2:Transform
Jump to navigation
Jump to search
Data Structure | |
---|---|
Game | Sly 2: Band of Thieves |
Size | 0x100 bytes |
The Transform component, or XFM struct, is responsible for the position, rotation, and velocity of an entity (or an entity's individual parts).
Fields
The Transform struct has the following fields:
Offset | Size | Type | Name | Notes |
---|---|---|---|---|
0x0 | struct MAT4
|
transformation
|
4x4 matrix | |
0x30 | 16 | struct VECTOR
|
position
| |
0x94 | 4 | int
|
freeze coordinates?
|
Freezes the coords if set to anything but 1 |
0x98 | 4 | xfm state?
| ||
0xB0 | 16 | struct VECTOR
|
velocity
|
Transformation matrix
The the rotation, scale, translation, and projection of the entity are encoded in a 4x4 matrix. The rotation and scale are embedded in the first 3 rows, and the 4th row controls the translation and projection. For the purposes of memory editing, you can effectively treat it as four VECTORs at offsets 0x0, 0x10, 0x20, and 0x30.