ControllerPartSensor
A SensorBase that outputs data about another BasePart based on Humanoid floor and ladder detection logic.
| Memory category | Instances |
|---|
Member index 8
Description
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.
History 30
- 731 Change Default of SensorMode from to Floor
- 731 Change Default of SensedPart from to
- 731 Change Default of SensedMaterial from to Air
- 731 Change Default of SearchDistance from to 0
- 731 Change Default of LadderSearchOffset from to 5
- 731 Change Default of LadderSearchHeight from to 6
- 731 Change Default of HitNormal from to Vector3(0, 1, 0)
- 731 Change Default of HitFrame from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 726 Change Default of SensorMode from Floor to
- 726 Change Default of SensedPart from to
- 726 Change Default of SensedMaterial from Air to
- 726 Change Default of SearchDistance from 0 to
- 726 Change Default of LadderSearchOffset from 5 to
- 726 Change Default of LadderSearchHeight from 6 to
- 726 Change Default of HitNormal from Vector3(0, 1, 0) to
- 726 Change Default of HitFrame from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 722 Change Default of HitNormal from Vector3(0, 0, 0) to Vector3(0, 1, 0)
- 717 Add LadderSearchOffset
- 717 Add LadderSearchHeight
- 714 Add SensedMaterial
- 705 Change Default of HitFrame from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 705 Change Default of HitFrame from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 702 Change Default of HitFrame from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 597 Change Tags of ControllerPartSensor from [NotBrowsable] to []
- 565 Add SensorMode
- 565 Add SensedPart
- 565 Add SearchDistance
- 565 Add HitNormal
- 565 Add HitFrame
- 565 Add ControllerPartSensor
Members 8
HitFrame
| Type | Default | |
|---|---|---|
| CFrame | 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 | |
The position in world space where the sensor hit the ControllerPartSensor.SensedPart.
| Thread safety | ReadSafe |
|---|---|
| Category | Output |
| Loaded/Saved | true |
History 6
- 731 Change Default of HitFrame from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 726 Change Default of HitFrame from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 705 Change Default of HitFrame from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 705 Change Default of HitFrame from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 702 Change Default of HitFrame from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 565 Add HitFrame
HitNormal
| Type | Default | |
|---|---|---|
| Vector3 | 0, 1, 0 | |
The surface normal at the position where the sensor hit the SensedPart.
| Thread safety | ReadSafe |
|---|---|
| Category | Output |
| Loaded/Saved | true |
LadderSearchHeight
| Type | Default | |
|---|---|---|
| float | 6 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 3
- 731 Change Default of LadderSearchHeight from to 6
- 726 Change Default of LadderSearchHeight from 6 to
- 717 Add LadderSearchHeight
LadderSearchOffset
| Type | Default | |
|---|---|---|
| float | 5 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 3
- 731 Change Default of LadderSearchOffset from to 5
- 726 Change Default of LadderSearchOffset from 5 to
- 717 Add LadderSearchOffset
SearchDistance
| Type | Default | |
|---|---|---|
| float | 0 | |
The distance from the sensor's parent BasePart to use when sensing other parts.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 3
- 731 Change Default of SearchDistance from to 0
- 726 Change Default of SearchDistance from 0 to
- 565 Add SearchDistance
SensedMaterial
| Type | Default | |
|---|---|---|
| Material | Air | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
History 3
- 731 Change Default of SensedMaterial from to Air
- 726 Change Default of SensedMaterial from Air to
- 714 Add SensedMaterial
SensedPart
| Type | Default | |
|---|---|---|
| BasePart | ||
A reference to the BasePart hit by the sensor.
| Thread safety | ReadSafe |
|---|---|
| Category | Output |
| Loaded/Saved | true |
History 3
- 731 Change Default of SensedPart from to
- 726 Change Default of SensedPart from to
- 565 Add SensedPart
SensorMode
| Type | Default | |
|---|---|---|
| SensorMode | Floor | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 3
- 731 Change Default of SensorMode from to Floor
- 726 Change Default of SensorMode from Floor to
- 565 Add SensorMode