-
Notifications
You must be signed in to change notification settings - Fork 1
ROTSHAPE
Jocelyn Beedie edited this page Nov 15, 2020
·
5 revisions
Rotshapes are used for objects that always face the camera, such as the collectible Neutrons in Jimmy Neutron: Boy Genius.
struct RotShape {
TransformationHeader transform;
uint32_t unknown4; // Always 1, might correlate with number of 'unknown5'?
Vector3 offset; // position. Don't know if it rotates billboard origin
uint32_t unknown6; // Always 1, might correlate with number of 'unknown7'?
float uknown7; // Always 0.0
uint32_t unknown8; // Always 2, might correlate with number of 'size'?
Vector3 size[2];
uint32_t unknown9; // Always 4, might correlate with number of 'texcoords'?
Vector2 texcoords[4]; // Always {{0.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {0.0, 1.0}}
uint32_t unknown10; // Always 1, might correlate with number of 'materialanim_id'?
int32_t materialanim_id; // Animated material ID
uint16_t billboard_mode;
}
The size
components represent how big the RotShape is. The z
value of both size
components is always 0.0.
A common value for the size
component is {{-1, 1, 0}, {1, -1, 0}}
, which means that the top-left corner is at {-1, 1, 0}
and the bottom-right corner is at {1, -1, 0}
.
The billboard_mode
can have one of two values.
Value | Name | Usage |
---|---|---|
0 | Y-Billboard | The sprite's Y rotation will be adjusted so that it faces the camera. Viewing the sprite from the top or bottom will break the illusion. |
1 | Complete Billboard | The sprite will rotate so that it faces the camera. |