Sonic Adventure 2/Camera Information: Difference between revisions
Created the SA2 variant of the Camera Information page. Credit goes to ItsEasyActually and the Sonic Adventure Stage Tools library for the source of this page's information. |
|||
| Line 359: | Line 359: | ||
|- | |- | ||
|2E | |2E | ||
| | |Boolean | ||
|Enable player point | |Enable player point | ||
|When true, the point will interact with the player. If false, the point can still be referenced by other points. | |When true, the point will interact with the player. If false, the point can still be referenced by other points. | ||
|- | |- | ||
|2F | |2F | ||
| | |Boolean | ||
|Track player | |Track player | ||
|When a flow index is set, this enables the camera to retain tracking the player along its path. If disabled, the camera follows the fixed path along the points without attempting to keep the player in view. | |When a flow index is set, this enables the camera to retain tracking the player along its path. If disabled, the camera follows the fixed path along the points without attempting to keep the player in view. | ||
Revision as of 07:59, 17 September 2026
This is a basic guideline on the cameras in Sonic Adventure 2.
Camera information for the game's levels is usually stored within files labeled as STG??CAM.PRS.
File Structure
The following section will contain information pertaining to the CAM files.
Header
The header always has a set size of 32 bytes, with the last four bytes acting as a buffer.
| Offset | Type | Description |
|---|---|---|
| 0 | INT32 | Content flags |
| 4 | INT32 | Total 1P Camera objects size |
| 8 | INT32 | Total 1P Camera points size |
| C | INT32 | Total Demo Camera objects size |
| 10 | INT32 | Total Demo Camera points size |
| 14 | INT32 | Total Multiplayer Camera objects size |
| 18 | INT32 | Total Multiplayer Camera points size |
| 1C | INT32 | Null |
Content Flags
| ID | Description |
|---|---|
| 0 | Null |
| 2 | Has Cameras |
| 3 | Has Points |
| 4 | Has Demo Cameras |
| 5 | Has Demo Points |
| 6 | Has Multiplayer Cameras |
| 7 | Has Multiplayer Points |
Camera Object Data
| Offset | Type | Name | Description |
|---|---|---|---|
| 0 | INT32 | Camera Mode | Please see the Camera Modes section below. |
| 4 | INT32 | Camera Adjustment Mode | Mode in which the camera will transition into the newly active volume. |
| 8 | INT32 | Priority | This sets the priority of the camera when the player may be in multiple zones. If the priority is higher than 0, the volume will become active when the player enters it, but it will also stop being active once the player leaves the volume. |
| C | INT32 | Camera Volume Shape | Shape of the volume, shapes are Sphere (1), Plane (2), and Block (Cube) (3) |
| 10 | Float(3) | Collision Position | |
| 1C | INT32(3) | Collision Rotation | |
| 28 | Float(3) | Collision Scale | |
| 34 | Float(3) | Camera Position | |
| 40 | INT32(3) | Camera Rotation | |
| 4C | Float(3) | Target Position | |
| 58 | INT32(8) | Additional properties | This section's usage varies by camera mode. Please look through the Camera Modes section to see what information currently exists on what these properties do for the cameras where they're applicable. |
| 78 | Float(8) | Additional properties | This section's usage varies by camera mode. Please look through the Camera Modes section to see what information currently exists on what these properties do for the cameras where they're applicable. |
Camera Modes
Below is information on each camera type.
| ID | Type | Description |
|---|---|---|
| 0 | None | Has no impact if the player enters the volume. |
| 1 | User | Unknown how it works precisely. It acts the same as None. |
| 2 | Follow | Follows the player without any rotation. Camera will be locked to the direction it was facing when the player enters the volume. Camera can pass through level geometry in this mode. |
| 3 | Knuckles | Default camera mode. Follows the player, rotating with the player and respecting level geometry. |
| 4 | Editor | Non-functional. |
| 5 | Editor2 | Non-functional. |
| 6 | SnapShot | User controlled camera. DPad will move the camera, L and R triggers will raise and lower the camera. Holding Start + using the joystick will rotate the camera. |
| 7 | Klamath | Camera mode focuses on a point on the same XZ plane as the camera itself using the Target Position. Y axis of the Target Position is not used.
Properties:
The Distance to Player property will also modify the height of the camera if the Additional Vertical Camera Height is set to 0. |
| 8 | Point | Camera points to a Target while keeping the player in view.
Properties:
|
| 9 | Ashland | Camera is in a fixed position and tracks the player as they move.
Properties:
The Camera FOV is treated like an exact degree value rather than BAMs. This means that setting it to 90 means the FOV is 90d. |
| 10 | Fix | Camera is in a fixed position and points to a fixed Target, does not target the player to any degree. |
| 11 | Leave | When active, the camera will lock itself to its last set location and track the player like the Ashland camera does. |
| 12 | Space | This enables use of the Camera Points while active. Below is information on the Points
This is the scale of the sphere for the player point. When the player enters this point, it activates the camera.
This is the position of the camera for the point.
Each point has six potential links it can be assigned to. These create lines of movement for the camera based on where the player may move to. In the editor in Blender, these need to be linked to other Point objects otherwise the link will fail to write when exporting.
This enables the point to be functional when the player enters its radius. When it's disabled, the point can still be linked to, but it will not become the "active" point when the player is within its radius.
This is a bit mislabeled currently, but it changes how the camera moves between the points as the player moves through them. It makes it so the player is actually ignored in terms of being kept in view and instead just smooths out the movement of the camera. The only level that makes use of this feature seems to be Radical Highway. |
| 13 | Carmel | Functions similarly to Knuckles cameras, except it better respects the level geometry in terms of following the player around corners. |
| 14 | Motion | Crashes the game, no other information at this time. |
| 15 | BossInit | Crashes the game, presumably only valid within boss levels and is likely handled by the game, not by the camera file. |
| 16 | BossPoint | Crashes the game, presumably only valid within boss levels and is likely handled by the game, not by the camera file. |
| 17 | Collision | Volume collider for the camera. |
| 18 | PStone | Similar to GakuGaku, but it will keep following the player until it eventually stops moving and locks into place. |
| 19 | Init | Extremely snappy movements when the player moves. This includes rotating as the player turns using the joystick. |
| 20 | EasySet | Crashes the game, no other information at this time. |
| 21 | BossKlamath | Crashes the game, presumably only valid within boss levels and is likely handled by the game, not by the camera file. |
| 22 | GakuGaku | Similar to the Leave mode except the camera locks to a fixed position and rotation, and it will not track the player while the volume is active. |
| 23 | KnucklesL | Same as the Knuckles mode, except it is further away from the player. |
| 24 | Fix2 | Similar to GakuGaku, but it will keep following the player until it eventually stops moving and locks into place. |
| 25 | PStone2 | Crashes the game, no other information at this time. |
| 26 | SS | Crashes the game, no other information at this time. |
| 27 | ColliLR | Volume collider for the camera, but this is only active when the player is actively using the L or R triggers to rotate the camera. Otherwise the camera ignores the collision volume. |
Camera Adjust Modes
| ID | Type |
|---|---|
| 0 | None |
| 1 | User |
| 2 | Half |
| 3 | Three1 |
| 4 | Three2 |
| 5 | Three3 |
| 6 | Three4 |
| 7 | Three5 |
| 8 | Relative1 |
| 9 | Relative2 |
| 10 | Relative3 |
| 11 | Relative4 |
| 12 | Relative5 |
| 13 | Relative6 |
Camera Point Data
| Offset | Type | Name | Description |
|---|---|---|---|
| 0 | Float(3) | Player Point | |
| C | Float | Player Point radius | |
| 10 | Float(3) | Camera Point | |
| 1C | Float | Camera Point radius | |
| 20 | INT16(6) | Links | Indices to any linked point objects in the scene |
| 2C | INT16 | Flow index | Indicates the travel direction of the linked cameras. When used, the camera will flow along an average of the line of points for a more fluid movement. Is prone to crashing when using indices that are not connected to the point in the Links section. |
| 2E | Boolean | Enable player point | When true, the point will interact with the player. If false, the point can still be referenced by other points. |
| 2F | Boolean | Track player | When a flow index is set, this enables the camera to retain tracking the player along its path. If disabled, the camera follows the fixed path along the points without attempting to keep the player in view. |
| General Information | File Formats • Model Formats • Levels • Texture Files • Light and Fog Data • Camera Info • Game Builds | ||
|---|---|---|---|
| Character Information | General | Model Data • Animation Files • Actions | |
| Animation Lists | Speed-Types | Sonic • Shadow • Amy • Metal Sonic | |
| Hunting-Types | Knuckles • Rouge • Tikal • Chaos Zero | ||
| Shooting-Types | Mech Tails • Mech Eggman • Chao Walker • Dark Chao Walker | ||
| Miscellaneous | Tails • Eggman • Super Sonic • Super Shadow | ||
| Sound Information | General | Voice List • Music Files | |
| Sound Effects | Stage Sounds | ||
| Other | Cutscenes | ||