kCModel
used for passing collision results to ScriptObject::OnCollide()
there's also a global kCModel, CModel
, which stores the results of the following functions:
kActor::CanSee()
kActor::CheckPosition()
kActor::GetSectorIndexAtLocation()
kActor::MoveToPosition()
kActor::SpawnProjectile()
Methods
kVec3& InterceptVector()
point of impact
kVec3& ContactNormal()
collided surface normal
const float& Fraction()
fraction from 0.0
to 1.0
between start and end points where collision occured
1.0
means no collision occured
uint ClipResult()
bit field describing the collision:
- CRF_NOCOLLISION=0
- CRF_FLOOR=1 << 0–made contact with a floor
- CRF_CEILING=1 << 1–made contact with a ceiling
- CRF_WALL=1 << 2–made contact with an edge (sector edge that isn't linked to another sector)
- CRF_OBJECT=1 << 3–made contact with an actor
- CRF_MESH=1 << 4–made contact with a static object
- CRF_ADJUST=1 << 5–z-axis was adjusted (ceiling or floor)
- CRF_WALLRADIUS=1 << 6–made contact with an edge during the wall radius collision test
kActor@ ContactActor()
actor that was collided with, if any