CAM

From Battlepedia
Jump to navigationJump to search
CAM
Camera
Type Object
Object ID 0x07
Games used Night of 100 Frights
Battle for Bikini Bottom
The SpongeBob SquarePants Movie
The Incredibles
Rise of the Underminer

This asset defines cameras. Usually, the game takes control from you to display a certain camera for a moment, such as when talking to NPCs or showing you something elsewhere in the level.

Format

Cameras are object assets, so they start with their 0x8 byte header, then are followed by:

Offset Type Variable Description
0x8 Vector3 pos Position
0x14 Vector3 at Normalized forward vector
0x20 Vector3 up Normalized up vector
0x2C Vector3 right Normalized left vector
0x38 Vector3 view_offset
0x44 short offset_start_frames usually 30
0x46 short offset_end_frames usually 45
0x48 float fov (degrees)
0x4C float trans_time (seconds) Time it takes to move the camera to this position.
0x50 int (enum?) trans_type usually 0, 1, 2, 5, or 6
0x54 int flags usually null
0x58 float? fade_up usually 0
0x5C float? fade_down usually 0
0x60 float[6] cam_follow
cam_shoulder
cam_static
cam_path
cam_staticFollow
???
0x78 int valid_flags
  • byte 1 usually 0
  • byte 2 usually 1
  • byte 3 usually 1
  • byte 4 usually 0x8F (143) or 0xC0 (192)
0x7C AssetID (Marker) ? markerid usually null
0x80 ? unknown padding? usually null
0x84 byte cam_type usually 0, 2, or 3
0x85 byte[3] pad padding
Events
0x88 Event[numberOfEvents] Events

Events