Table of Contents

Class EntityBehaviorKinematicCollider

Namespace
Vintagestory.GameContent
Assembly
VSEssentials.dll

Registers entity-local collision boxes as a transformed collider.
Uses the "kinematiccollider" code. Open in GitHub

[DocumentAsJson]
public class EntityBehaviorKinematicCollider : EntityBehavior
Inheritance
EntityBehaviorKinematicCollider

Examples

"behaviors": [
 {
    "code": "kinematiccollider",
    "collisionShape": {
        "base": "entity/nonliving/platform",
        "selectiveElements": [ "Floor*", "Rail*" ]
    },
    "carryEntities": true,
    "rotateWithEntity": true
 }
]

Fields

CarryEntities (Optional) (Default: true)

Whether supported entities follow this collider and inherit its motion when leaving it.

[DocumentAsJson("Optional", "true", false)]
public bool CarryEntities

Field Value

bool

ColliderCode (Optional) (Default: main)

Stable code used to resolve this collider's local registration on the client and server.

[DocumentAsJson("Optional", "main", false)]
public string ColliderCode

Field Value

string

CollisionBoxes (Optional)

Axis-aligned collision boxes in coordinates local to the entity position.

[DocumentAsJson("Optional", "", false)]
public Cuboidf[] CollisionBoxes

Field Value

Cuboidf[]

CollisionLayer (Optional) (Default: Solid)

Accepts collision layer names or an unsigned integer mask.

[DocumentAsJson("Optional", "Solid", false)]
public CollisionLayer CollisionLayer

Field Value

CollisionLayer

CollisionMask (Optional) (Default: All)

Exclude Entity to keep these boxes queryable without blocking movement.

[DocumentAsJson("Optional", "All", false)]
public CollisionLayer CollisionMask

Field Value

CollisionLayer

CollisionShape (Optional)

An optional model whose selected cuboid elements become this collider's boxes.

[DocumentAsJson("Optional", "", false)]
public CompositeShape? CollisionShape

Field Value

CompositeShape

KeepsSupportedEntitiesDry (Optional) (Default: false)

Whether supported entities should ignore liquid occupying the same world position, why have an option for this? Well someone may want a platform to work underwater!

[DocumentAsJson("Optional", "false", false)]
public bool KeepsSupportedEntitiesDry

Field Value

bool

RotateWithEntity (Optional) (Default: true)

Whether the collision boxes follow the entity pitch, yaw, and roll.

[DocumentAsJson("Optional", "true", false)]
public bool RotateWithEntity

Field Value

bool