Class Collision.Probe
+Represents a collision probe in the game world.
+Provides collision information from a reference world position.
+ +pragma nostrip
+ + +Functions
+Probe(pos, roomNumber) | +Create a Probe at a specified world position in a room. | +
Probe(pos, originRoomNumber, dir, dist) | +Create a Probe that casts from an origin world position in a room in a given direction for a specified distance. | +
Probe(Origin, originRoomNumber, rot, dist) | +Create a Probe that casts from an origin world position in a room in the direction of a given Rotation for a specified distance. | +
Probe(Origin, originRoomNumber, rot, relOffset) | +Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given Rotation. | +
GetPosition() | +Get the world position of this Probe. | +
GetFloorHeight() | +Get the floor height at this Probe. | +
GetCeilingHeight() | +Get the ceiling height at this Probe. | +
GetWaterSurfaceHeight() | +Get the water surface height at this Probe. | +
GetFloorNormal() | +Get the normal of the floor at this Probe. | +
GetCeilingNormal() | +Get the normal of the ceiling at this Probe. | +
GetFloorMaterialType() | +Get the material type of the floor at this Probe. | +
GetCeilingMaterialType() | +Get the material type of the ceiling at this Probe. | +
IsSteepFloor() | +Check if the floor at this Probe is steep. | +
IsSteepCeiling() | +Check if the ceiling at this Probe is steep. | +
IsWall() | +Check if there is a wall at this Probe. | +
IsInsideSolidGeometry() | +Check if this Probe is inside solid geometry, i.e. | +
IsClimbableWall(headingAngle) | +Check if there is a climbable wall in the given heading angle at this Probe. | +
IsMonkeySwing() | +Check if there is a monkey swing at this Probe. | +
IsDeath() | +Check if there is a death tile at this Probe. | +
+
+ + +
Functions
+ +-
+
- + + Probe(pos, roomNumber) + +
-
+ Create a Probe at a specified world position in a room.
+
+
+
+
Parameters:
+-
+
- pos + Vec3 + World position. + +
- roomNumber + int + Room number. + +
Returns:
+-
+
+ Probe
+ a new Probe.
+
+ - + + Probe(pos, originRoomNumber, dir, dist) + +
-
+ Create a Probe that casts from an origin world position in a room in a given direction for a specified distance.
+ Required to correctly traverse between rooms.
+
+
+
+
Parameters:
+-
+
- pos + Vec3 + Origin world position to cast from. + +
- originRoomNumber + int + Origin's room number. + +
- dir + Vec3 + Direction in which to cast. + +
- dist + float + Distance to cast. + +
Returns:
+-
+
+ Probe
+ a new Probe.
+
+ - + + Probe(Origin, originRoomNumber, rot, dist) + +
-
+ Create a Probe that casts from an origin world position in a room in the direction of a given Rotation for a specified distance.
+ Required to correctly traverse between rooms.
+
+
+
+
Parameters:
+-
+
- Origin + Vec3 + world position to cast from. + +
- originRoomNumber + int + Origin's room number. + +
- rot + Rotation + Rotation defining the direction in which to cast. + +
- dist + float + Distance to cast. + +
Returns:
+-
+
+ Probe
+ a new Probe.
+
+ - + + Probe(Origin, originRoomNumber, rot, relOffset) + +
-
+ Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given Rotation.
+ Required to correctly traverse between rooms.
+
+
+
+
Parameters:
+-
+
- Origin + Vec3 + world position to cast from. + +
- originRoomNumber + int + Origin's room number. + +
- rot + Rotation + Rotation according to which the input relative offset is rotated. + +
- relOffset + Vec3 + Relative offset to cast. + +
Returns:
+-
+
+ Probe
+ a new Probe.
+
+ - + + GetPosition() + +
-
+ Get the world position of this Probe.
+
+
+
+
+
Returns:
+-
+
+ Vec3
+ World position.
+
+ - + + GetFloorHeight() + +
-
+ Get the floor height at this Probe.
+
+
+
+
+
Returns:
+-
+
+ int[opt]
+ Floor height. nil: no floor exists.
+
+ - + + GetCeilingHeight() + +
-
+ Get the ceiling height at this Probe.
+
+
+
+
+
Returns:
+-
+
+ int[opt]
+ Ceiling height. nil: no ceiling exists.
+
+ - + + GetWaterSurfaceHeight() + +
-
+ Get the water surface height at this Probe.
+
+
+
+
+
Returns:
+-
+
+ int[opt]
+ Water surface height. nil: no water surface exists.
+
+ - + + GetFloorNormal() + +
-
+ Get the normal of the floor at this Probe.
+
+
+
+
+
Returns:
+-
+
+ Vec3[opt]
+ Floor normal. nil: no floor exists.
+
+ - + + GetCeilingNormal() + +
-
+ Get the normal of the ceiling at this Probe.
+
+
+
+
+
Returns:
+-
+
+ Vec3[opt]
+ Ceiling normal. nil: no ceiling exists.
+
+ - + + GetFloorMaterialType() + +
-
+ Get the material type of the floor at this Probe.
+
+
+
+
+
Returns:
+-
+
+ Collision.MaterialType[opt]
+ Floor material type. nil: no floor exists.
+
+ - + + GetCeilingMaterialType() + +
-
+ Get the material type of the ceiling at this Probe.
+
+
+
+
+
Returns:
+-
+
+ Collision.MaterialType[opt]
+ Ceiling material type. nil: no ceiling exists.
+
+ - + + IsSteepFloor() + +
-
+ Check if the floor at this Probe is steep.
+
+
+
+
+
Returns:
+-
+
+ bool[opt]
+ Steep floor status. true: is a steep floor, false: isn't a steep floor, nil: no floor exists.
+
+ - + + IsSteepCeiling() + +
-
+ Check if the ceiling at this Probe is steep.
+
+
+
+
+
Returns:
+-
+
+ bool[opt]
+ Steep ceiling status. true: is a steep ceiling, false: isn't a steep ceiling, nil: no ceiling exists.
+
+ - + + IsWall() + +
-
+ Check if there is a wall at this Probe. Can be used to determine if a wall and ceiling exist.
+
+
+
+
+
Returns:
+-
+
+ bool
+ Wall status. true: is a wall, false: isn't a wall
+
+ - + + IsInsideSolidGeometry() + +
-
+ Check if this Probe is inside solid geometry, i.e. below a floor, above a ceiling, or inside a wall.
+
+
+
+
+
Returns:
+-
+
+ bool
+ Inside geometry status. true: is inside, false: is outside
+
+ - + + IsClimbableWall(headingAngle) + +
-
+ Check if there is a climbable wall in the given heading angle at this Probe.
+
+
+
+
Parameters:
+-
+
- headingAngle + float + Heading angle at which to check for a climbable wall. + +
Returns:
+-
+
+ bool
+ Climbable wall status. true: is climbable, false: isn't climbable
+
+ - + + IsMonkeySwing() + +
-
+ Check if there is a monkey swing at this Probe.
+
+
+
+
+
Returns:
+-
+
+ bool
+ Monkey swing status. true: is a monkey swing, false: isn't a monkey swing
+
+ - + + IsDeath() + +
-
+ Check if there is a death tile at this Probe.
+
+
+
+
+
Returns:
+-
+
+ bool
+ Death tile status. true: is a death tile, false: isn't a death tile
+
+