The Detect Object Ability Base ability is an abstract class designed for any ability that needs another object to start. This includes abilities such as picking up an object, vaulting, climbing, interacting, etc. This ability doesn’t do anything besides detect when an object can be interacted with by the character.

Inspected Fields

Object Detection

The mask which specifies how the ability should detect other objects.

  • Trigger: Use a trigger to detect if the character is near an object
  • Charactercast: Use the character controllers to do a cast in order to detect if the character is near an object.
  • Raycast: Use a raycast to detect if the character is near an object.
  • Spherecast: Use a spherecast to detect if the character is near an object.

Multiple values can be selected, though in most cases just the Trigger or Charactercast options will be sufficient.

Detect Layers

The LayerMask of the object or trigger that should be detected.

Use Look Direction

Should the detection method use the Look Source direction? If false the character direction will be used.

Angle Threshold

The maximum angle that the character can be relative to the forward direction of the object.

Object ID

The unique ID value of the Object Identifier component. A value of -1 indicates that this ID should not be used.

Cast Distance

The distance of the cast. Used if the Object Detection Mode is set to anything other then a Trigger detection mode.

Cast Frame Interval

The number of frames that should elapse before another cast is performed. A value of 0 will allow the cast to occur every frame.

Cast Offset

The offset applied to the raycast or spherecast.

Spherecast Radius

The radius of the spherecast.