Blocking Motion Component

Without Blocking
With Blocking

Blocking Motion Component is used to avoid the weapon clipping inside objects problem, both on first and third person.

  • Placement: Preferably on the equipment.

  • Default Computation Stage: 6

  • Inputs:

    • Blocking Enabled: defines if blocking should be enabled.

    • Preset Data: Requires the Preset: Blocking Motion fragment that defines the blocking settings.

    • Blocking Trace Start Relative Transform: the location relative to the actor where the trace should start.

    • Blocking Trace End Relative Transform: the location relative to the actor where the trace should end.

How it Works

  • Stable Tracing: Instead of tracing from the physical weapon mesh (which moves during animations), the system projects a logical ray from the Weapon Root to the Muzzle, strictly aligned with the player's Aim Rotation (Camera).

  • Adaptive Blocking: When this ray hits an obstacle, the system calculates a "Blocking Alpha" (0.0 to 1.0) based on the impact distance. This Alpha is used to smoothly blend the weapon into a retracted "Blocked Pose" to avoid the wall.

Usage

To initialize the system, you must define the mesh to trace from and the trace distance.

1. Start Transform(Root):

  • Get the socket transform for the weapon's Grip or Root (pivot).

  • Use RTS_Actor (Actor Space) to get the offset relative to the weapon actor.

  • Set this as BlockingTraceStartRelativeTransform.

circle-info

The system uses the distance between these two points to determine the length of the blocking trace.

  • End Transform (Muzzle):

2. End Transform (Muzzle):

  • Get the socket transform for the weapon's Muzzle.

  • Use RTS_Actor (Actor Space).

  • Set this as BlockingTraceEndRelativeTransform.

Last updated