Skip to main content

Collision Setup

Set up collisions to prevent bones from penetrating through the body.

Collision Types

Sphere

Suitable for spherical parts like head and shoulders.

Sphere collision example

Capsule

Suitable for cylindrical parts like arms and legs.

Capsule collision example

Plane

Used for flat surface restrictions like ground and walls.

Box

Version Info

Added in v1.17.0

Box-shaped collision. Suitable for rectangular shapes like body and buildings.

UPROPERTY()
TArray<FBoxLimit> BoxLimits;

FBoxLimit Properties:

PropertyTypeDescription
DrivingBoneFBoneReferenceBone that collision follows
OffsetFVectorOffset from bone
RotationFRotatorBox rotation
ExtentFVectorBox half-extents (size in each axis direction)

Collision Generation from PhysicsAsset

Version Info

Added in v1.17.0

You can auto-generate collision shapes from existing PhysicsAssets. Collision bodies defined in PhysicsAsset are converted to KawaiiPhysics collisions.

Usage

  1. Select KawaiiPhysics node
  2. Set existing PhysicsAsset to Physics Asset property
  3. Collision shapes are automatically generated

Benefits

  • Reuse existing PhysicsAssets
  • Reduces manual collision setup work
  • Consistent collision settings

Adding Collision

  1. Select the KawaiiPhysics node
  2. Add elements to Spherical Limits / Capsule Limits / Box Limits / Planar Limits array
  3. Set Driving Bone (bone that collision follows)
  4. Adjust offset and size

Driving Bone

Collision follows and moves with the Driving Bone.

upperarm_r (Driving Bone)
↓ Follows
[Capsule Collision] → Hair stops here

Inside vs Outside

Inside (Inner Limit)

Limits bones to inside the sphere.

  • Use case: Following head shape

Outside (Outer Limit)

Limits bones to outside the sphere.

  • Use case: Preventing penetration into shoulders

Performance Considerations

More collisions increase processing load.

tip
  • Use the minimum necessary collisions
  • Approximate complex shapes with multiple simple shapes

For more details, see Performance.