Class
ControllerPartSensor
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#
HitFrameCFrame | The position in world space where the sensor hit the
ControllerPartSensor.SensedPart.ReadSafe |
HitNormalVector3 | The surface normal at the position where the sensor hit the
ControllerPartSensor.SensedPart.ReadSafe |
LadderSearchHeightfloat | The upper bound, in studs, of the vertical region the sensor searches for
a ladder when ControllerPartSensor.SensorMode is set to a ladder
mode.ReadSafe |
LadderSearchOffsetfloat | The 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 |
SearchDistancefloat | The distance from the sensor's parent BasePart to use when sensing
other parts.ReadSafe |
SensedMaterialMaterial | The surface Material of the ControllerPartSensor.SensedPart
that the sensor is currently detecting.ReadSafe |
SensedPartBasePart | A reference to the BasePart hit by the sensor.ReadSafe |
SensorModeSensorMode | Determines 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 Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild