Table of Contents

Jolt Hitbox Component

Hitboxes

The Jolt hitbox component is used to add collider shapes to an animated mesh.

The component must be attached next to another component that defines the skeleton to use, for instance an animated mesh component or a skeleton component. It will then use that skeleton to create the physics shapes.

Consequently, the configuration of the hitbox shapes is set up through the skeleton asset.

The hitboxes are usually used to be able to shoot an animated character. Although they share the collider setup with the Jolt ragdoll component, hitboxes and ragdolls are separate features that can be used independently of each other. For example, while a character is alive, it would use hitboxes, so that raycasts can determine where it would be hit, but it would not use a ragdoll component yet. Once a character dies, a ragdoll component would be activated to make it fall to the ground. The hitbox component could now be deactivated (which also makes sense for performance reasons), since it's functionality may not be needed anymore.

Component Properties

  • Query Shapes Only: If true, the shapes that get created act the same way as query shape actors. That means the shapes can be detected via raycasts and other shape queries (e.g. the projectile component will be able to hit it), but otherwise they don't participate in the physical simulation. If set to false, full kinematic shapes are used, which means the shapes will push all dynamic actors aside. This is rarely desired, usually one would rather use a character controller or a single kinematic actor in the form of a capsule to represent the animated mesh, but in some exceptional cases it might be useful.
  • Update Threshold: How often the hitboxes are updated to follow the animation. At 0, they are updated every frame. If perfect alignment with the animation is not necessary, it is better for performance to use a larger time step.

See Also