Roblox UtilitiesDevlHub Roblox Documentation

Class

ControllerPartSensor

Memory category
Instances

A SensorBase that outputs data about another BasePart based on Humanoid floor and ladder detection logic.

A SensorBase that outputs data about another BasePart based on Humanoid floor and ladder detection logic. It is primarily used for sending data to a character controller. Using a ControllerPartSensor allows you to detect BaseParts in the same manner as the Humanoid uses for detecting floors and ladders.

Properties 8#

HitFrameCFrameThe position in world space where the sensor hit the ControllerPartSensor.SensedPart.ReadSafe
HitNormalVector3The surface normal at the position where the sensor hit the ControllerPartSensor.SensedPart.ReadSafe
LadderSearchHeightfloatThe upper bound, in studs, of the vertical region the sensor searches for a ladder when ControllerPartSensor.SensorMode is set to a ladder mode.ReadSafe
LadderSearchOffsetfloatThe downward offset, in studs, that positions the vertical region the sensor searches for a ladder when ControllerPartSensor.SensorMode is set to a ladder mode.ReadSafe
SearchDistancefloatThe distance from the sensor's parent BasePart to use when sensing other parts.ReadSafe
SensedMaterialMaterialThe surface Material of the ControllerPartSensor.SensedPart that the sensor is currently detecting.ReadSafe
SensedPartBasePartA reference to the BasePart hit by the sensor.ReadSafe
SensorModeSensorModeDetermines what behavior this SensorBase uses when sensing other parts.ReadSafe

HitFrame: CFrame#

ReadSafe

The position in world space where the sensor hit the ControllerPartSensor.SensedPart.

HitNormal: Vector3#

ReadSafe

The surface normal at the position where the sensor hit the SensedPart.

LadderSearchHeight: float#

ReadSafe

Top of the vertical extent the sensor scans for a climbable ladder, in studs relative to the sensor's parent BasePart. Together with ControllerPartSensor.LadderSearchOffset, it defines the height range: the region extends upward to LadderSearchHeight minus LadderSearchOffset.

Defaults to 6; clamped to non-negative values.

Only affects sensing when ControllerPartSensor.SensorMode is a ladder mode such as SensorMode.Ladder. Because SensorMode defaults to SensorMode.Floor, this has no effect until SensorMode is changed.

LadderSearchOffset: float#

ReadSafe

Downward offset, in studs relative to the parent BasePart, that positions the vertical extent scanned for a climbable ladder. Behaves like a hip-height offset: increasing it lowers both the bottom and top of the searched region, and scales the rung-spacing tolerance used to decide whether a surface is climbable.

Defaults to 5; clamped to non-negative values.

Only affects sensing when ControllerPartSensor.SensorMode is a ladder mode such as SensorMode.Ladder. Because SensorMode defaults to SensorMode.Floor, this has no effect until SensorMode is changed.

SearchDistance: float#

ReadSafe

The distance from the sensor's parent BasePart to use when sensing other parts.

SensedMaterial: Material#

ReadSafe

Surface Material of the part the sensor currently detects, matching the material Humanoid floor and ladder detection report for the same contact. Updated as an output alongside ControllerPartSensor.SensedPart, ControllerPartSensor.HitFrame, and ControllerPartSensor.HitNormal each time the sensor senses.

Defaults to Material.Air.

SensedPart: BasePart#

ReadSafe

A reference to the BasePart hit by the sensor.

SensorMode: SensorMode#

ReadSafe

Determines what behavior this SensorBase uses when sensing other parts.

A setting of SensorMode.Ladder performs the same ladder detection logic used by a Humanoid to populate sensor output. It currently always senses along the forward vector of its parent BasePart.

A setting of SensorMode.Floor performs the same floor detection logic used by a Humanoid to populate sensor output. It currently always senses along the negative up vector of the world.

Inherited members#

Inherited from SensorBase 3
Properties (1)

UpdateType

Methods (1)

Sense

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed