To get radians: value / 255 * π Sine of radians is uncompressed edge cosine
To do: Confirm this is the same in BP as in NFS.
CgsGeometric::PolygonSoupVertex
Offset
Length
Type
Name
Description
Comments
0x0
0x2
uint16_t
mu16X
0x2
0x2
uint16_t
mu16Y
0x4
0x2
uint16_t
mu16Z
Collision tag
BrnWorld::CollisionTag
IMPORTANT: The position of the group and material tags are flipped in soups, so the material tag is at offset 0x0 and the group tag is at 0x2. This is likely a side effect of the field being written as uint32_t instead of CollisionTag. It is also byteswapped as a 32-bit field on little endian systems, not two 16-bit fields.
The above behavior has been confirmed by CollisionDebugComponent::DrawCollisionPolyCallback(), which modifies the value from its uint32_t parameter luPolyTag, flipping the field positions before using it as a CollisionTag when calling GetPolyColour().
To do: Not unused anymore. Both bits can be set, sometimes together. Flags?
6
6
Surface ID
From surface list
12
4
Traffic info/data/direction
If 0, GetTrafficInfo() returns E_TRAFFIC_DIRECTION_NO_LANES. If 1, it returns E_TRAFFIC_DIRECTION_UNKNOWN. Otherwise, E_TRAFFIC_DIRECTION_VALID is returned. If the traffic direction is valid, the traffic angle parameter is set. To get the angle (in radians), do: (value - 2) / 14 * 2π 2 is the minimum angle and 14 is the value range. See also: TrafficDirection
Example collision tag
Taken from a soup, so keep the flipped field positions in mind.