Unleashed-Generations Havok Collision Attributes: Difference between revisions
NextinHKRY (talk | contribs) No edit summary |
No edit summary |
||
(18 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Sonic Unleashed and Sonic Generations | Sonic Unleashed and Sonic Generations have several collision tags that they use to determine the type of terrain, its properties, and what can collide with what else. These attributes can be applied to <code>.hkx</code> files with [[Havok Converter]]. To learn how to apply these tags to collision meshes, check out [[Adding Collision Tags with Havok Converter]]. | ||
== Material Type == | == Material Type == | ||
Line 5: | Line 5: | ||
=== swa_attribute (1260399450) === | === swa_attribute (1260399450) === | ||
{| class="wikitable" | {| class="wikitable" | ||
| | !Index | ||
| | !Type | ||
| | !Notes | ||
|- | |||
|0 | |||
|Unknown | |||
| | |||
|- | |- | ||
|1 | |1 | ||
| | |Normal | ||
| | |This plays Concrete footstep sounds | ||
|- | |- | ||
|2 | |2 | ||
| | |DeepWater | ||
|Requires Convex Hull meshes | |Requires Convex Hull meshes | ||
|- | |- | ||
|3 | |3 | ||
| | |Rock | ||
| | |This also plays Concrete footstep sounds | ||
|- | |- | ||
|4 | |4 | ||
Line 34: | Line 38: | ||
|- | |- | ||
|7 | |7 | ||
|Snow | |Snow | ||
|This requires an extra file to be added in Generations | |This requires an extra file to be added in Generations, add a file called | ||
<code>ef_ch_sns_yh1_smoke_snow.dds</code> to prevent it from crashing the game | |||
prevent it from crashing the game | |||
|- | |- | ||
|8 | |8 | ||
Line 52: | Line 55: | ||
|- | |- | ||
|11 | |11 | ||
| | |ShallowWater | ||
| | |Sonic can walk inside the collision with @Water in the name, otherwise he can only walk on the collision | ||
|- | |- | ||
|12 | |12 | ||
| | |Dead | ||
| | |Kills the player if touched | ||
|- | |- | ||
|13 | |13 | ||
Line 64: | Line 67: | ||
|- | |- | ||
|14 | |14 | ||
|Water | |NoDeadWater | ||
|Water that doesn't make you drown, | |||
use Box or Convex Hull meshes in Generations | |||
|- | |- | ||
|15 | |15 | ||
| | |NoEffect | ||
|Will play no footsteps or emit any particles in Unleashed | |Will play no footsteps or emit any particles in Unleashed | ||
In Generations this will still play footstep sounds | In Generations this will still play footstep sounds | ||
|- | |- | ||
|16 | |16 | ||
Line 77: | Line 81: | ||
|- | |- | ||
|17 | |17 | ||
| | |PinballGlass | ||
|Only in Generations | |Only in Generations, used in Casino Night Zone | ||
|- | |- | ||
|18 | |18 | ||
| | |WrongWay | ||
|Only in Generations | |Only in Generations | ||
|- | |- | ||
Line 92: | Line 96: | ||
|Only in Generations | |Only in Generations | ||
|} | |} | ||
== Collision Properties == | == Collision Properties == | ||
Most of the parameters here are boolean parameters, with 0 value indicating it's disabled, and 1 indicating it's enabled. | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|+ | |+ | ||
Line 103: | Line 106: | ||
|swa_evil_isbalance_ground | |swa_evil_isbalance_ground | ||
|122999549 | |122999549 | ||
|This is used for Classic Sonic to | |This is used for the Werehog to detect if he should start balancing on a tight strip, and its also used for Classic Sonic to detect where a ledge is. | ||
|- | |- | ||
|swa_isIce_ground | |swa_isIce_ground | ||
Line 115: | Line 118: | ||
|intersectional_way | |intersectional_way | ||
|1009866916 | |1009866916 | ||
| | |Generations only, used in Casino Night Zone. | ||
|- | |- | ||
|swa_sonic_isbeltconveyor | |swa_sonic_isbeltconveyor | ||
|1196263925 | |1196263925 | ||
|Used for the <code>BeltConveyorCollision</code> object in Generations | |Used for the <code>BeltConveyorCollision</code> object in Generations and the <code>Egg_BeltCollision</code>'''/'''<code>Egg_BeltCollisionSV</code> objects in Unleashed, the value of this field is the speed of the conveyor belt. | ||
|- | |- | ||
|swa_sonic_isplayerwall | |swa_sonic_isplayerwall | ||
Line 139: | Line 142: | ||
|pinball_glass | |pinball_glass | ||
|2040148113 | |2040148113 | ||
| | |Generations only, used in Casino Night Zone. | ||
|- | |- | ||
|swa_col_player | |swa_col_player | ||
Line 147: | Line 150: | ||
== Mesh Name Tags == | == Mesh Name Tags == | ||
Rigid bodies can have custom properties that are detected by the game itself to determine their interactions with other objects. These tags are added at the end of mesh names with an @ symbol as the separator (e.g. ghz_sea@Water). These properties are '''<u>Case-Sensitive</u>'''. | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 179: | Line 182: | ||
|- | |- | ||
|@NoCamera | |@NoCamera | ||
| | |Allows the camera to pass through the collision mesh | ||
|- | |- | ||
|@IceGround | |@IceGround | ||
Line 185: | Line 188: | ||
|- | |- | ||
|@Water | |@Water | ||
| | |Allows Sonic to go inside the collision mesh when using ShallowWater type | ||
|} | |||
== Collision Shapes == | |||
[[Havok Converter]] allows you to specify the shape of your collision meshes by appending tags to their names. By default, rigid bodies are created as mesh shapes, which might be incompatible with certain properties such as @Water. This is where you need to pick a collision shape that fits your use case. These tags are '''<u>Case-Sensitive</u>'''. | |||
{| class="wikitable" | |||
|+ | |||
!Name | |||
!Notes | |||
|- | |||
|@CONVEX(true) | |||
|Convex Hull mesh, most recommended outside mesh shapes | |||
|- | |||
|@CONVEX(1) | |||
|Same as @CONVEX(true) but shorter way of specifying it | |||
|- | |||
|@BOX | |||
|Axis aligned box that covers the whole mesh | |||
|- | |||
|@SPHERE | |||
|Largest sphere that covers the whole mesh | |||
|- | |||
|@CYLINDER | |||
|Axis aligned cylinder | |||
|- | |||
|@CAPSULE | |||
|Axis aligned capsule | |||
|} | |} |
Latest revision as of 11:26, 20 April 2025
Sonic Unleashed and Sonic Generations have several collision tags that they use to determine the type of terrain, its properties, and what can collide with what else. These attributes can be applied to .hkx
files with Havok Converter. To learn how to apply these tags to collision meshes, check out Adding Collision Tags with Havok Converter.
Material Type
swa_attribute (1260399450)
Index | Type | Notes |
---|---|---|
0 | Unknown | |
1 | Normal | This plays Concrete footstep sounds |
2 | DeepWater | Requires Convex Hull meshes |
3 | Rock | This also plays Concrete footstep sounds |
4 | Dirt | |
5 | Wood | |
6 | Grass | |
7 | Snow | This requires an extra file to be added in Generations, add a file called
|
8 | Metal | |
9 | Sand | Generations will play Concrete sound effects instead |
10 | Glass | |
11 | ShallowWater | Sonic can walk inside the collision with @Water in the name, otherwise he can only walk on the collision |
12 | Dead | Kills the player if touched |
13 | Damage | |
14 | NoDeadWater | Water that doesn't make you drown,
use Box or Convex Hull meshes in Generations |
15 | NoEffect | Will play no footsteps or emit any particles in Unleashed
In Generations this will still play footstep sounds |
16 | Oil | Only in Generations |
17 | PinballGlass | Only in Generations, used in Casino Night Zone |
18 | WrongWay | Only in Generations |
19 | Lava | Only in Generations |
20 | Poison | Only in Generations |
Collision Properties
Most of the parameters here are boolean parameters, with 0 value indicating it's disabled, and 1 indicating it's enabled.
Parameter Name | ID | Description |
---|---|---|
swa_evil_isbalance_ground | 122999549 | This is used for the Werehog to detect if he should start balancing on a tight strip, and its also used for Classic Sonic to detect where a ledge is. |
swa_isIce_ground | 246659335 | If enabled, this'll make the ground slippery (like in Holoska in Sonic Unleashed). This requires some extra files to be present to make it work; if these files are missing, the game will crash when the collision is touched by the player. |
swa_col_other | 620872783 | If enabled, anything that isn't the player or the camera will collide with the object. |
intersectional_way | 1009866916 | Generations only, used in Casino Night Zone. |
swa_sonic_isbeltconveyor | 1196263925 | Used for the BeltConveyorCollision object in Generations and the Egg_BeltCollision /Egg_BeltCollisionSV objects in Unleashed, the value of this field is the speed of the conveyor belt.
|
swa_sonic_isplayerwall | 1368296714 | Used to indicate if a surface can be used for wall-jumping. |
swa_col_specific | 1330259859 | This is set to 1 by default, setting it to 2 or 3 will make the IKs for Sonic adjust to the terrain. |
swa_col_attacking | 1651585625 | |
swa_col_camera | 1706239430 | If enabled, the camera will collide with this object. |
pinball_glass | 2040148113 | Generations only, used in Casino Night Zone. |
swa_col_player | 2088238466 | If enabled, the player will collide with the object. |
Mesh Name Tags
Rigid bodies can have custom properties that are detected by the game itself to determine their interactions with other objects. These tags are added at the end of mesh names with an @ symbol as the separator (e.g. ghz_sea@Water). These properties are Case-Sensitive.
Name | Notes |
---|---|
@Balance | Unleashed only |
@DamageFall | |
@DisableThrowColl | |
@DisableTemColl | |
@EnableQtoW / @enableQtoW | Generations only |
@Spiral / @spiral | Generations only |
@Slide | Requires a path with an ID of
888 to be present in the stage. |
@NoStanding | |
@NoCamera | Allows the camera to pass through the collision mesh |
@IceGround | |
@Water | Allows Sonic to go inside the collision mesh when using ShallowWater type |
Collision Shapes
Havok Converter allows you to specify the shape of your collision meshes by appending tags to their names. By default, rigid bodies are created as mesh shapes, which might be incompatible with certain properties such as @Water. This is where you need to pick a collision shape that fits your use case. These tags are Case-Sensitive.
Name | Notes |
---|---|
@CONVEX(true) | Convex Hull mesh, most recommended outside mesh shapes |
@CONVEX(1) | Same as @CONVEX(true) but shorter way of specifying it |
@BOX | Axis aligned box that covers the whole mesh |
@SPHERE | Largest sphere that covers the whole mesh |
@CYLINDER | Axis aligned cylinder |
@CAPSULE | Axis aligned capsule |