Detect Object Ability Base

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. The ability can filter the found objects using the Object Identifier component.

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.
  • Customcast: The ability will perform its own custom cast.

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 Position

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

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.

Trigger Interaction

Specifies if the cast should interact with triggers.

Spherecast Radius

The radius of the spherecast.

Max Trigger Object Count

The maximum number of valid triggers that the ability can detect.

Move With Object

Should the character move with the detected object?