Class Collision.Probe

Represents a collision probe in the game world.

Provides collision information from a reference world position.

Functions

Probe(pos, [roomNumber]) Create a Probe at a specified world position in a room.
Probe(pos, roomNumber, dir, dist) Create a Probe that casts from an origin world position in a room in a given direction for a specified distance.
Probe(pos, roomNumber, 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(pos, roomNumber, rot, relOffset) Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given rotation.
Probe:GetPosition() Get the world position of this Probe.
Probe:GetRoom() Get the Room object of this Probe.
Probe:GetRoomName() Get the room name of this Probe.
Probe:GetRoomNumber() Get the room number of this Probe.
Probe:GetFloorHeight() Get the floor height at this Probe.
Probe:GetCeilingHeight() Get the ceiling height at this Probe.
Probe:GetWaterSurfaceHeight() Get the water surface height at this Probe.
Probe:GetFloorNormal() Get the normal of the floor at this Probe.
Probe:GetCeilingNormal() Get the normal of the ceiling at this Probe.
Probe:GetFloorMaterialType() Get the material type of the floor at this Probe.
Probe:GetCeilingMaterialType() Get the material type of the ceiling at this Probe.
Probe:IsSteepFloor() Check if the floor at this Probe is steep.
Probe:IsSteepCeiling() Check if the ceiling at this Probe is steep.
Probe:IsWall() Check if the Probe is inside a wall.
Probe:IsInsideSolidGeometry() Check if this Probe is inside solid geometry (below a floor, above a ceiling, inside a bridge, or inside a wall).
Probe:IsClimbableWall(headingAngle) Check if there is a climbable wall in the given heading angle at this Probe.
Probe:IsMonkeySwing() Check if there is a monkey swing sector at this Probe.
Probe:IsDeath() Check if there is a death sector at this Probe.
Probe:Preview() Preview this Probe in the Collision Stats debug page.


Functions

Probe(pos, [roomNumber])
Create a Probe at a specified world position in a room.

Parameters:

  • pos Vec3 World position.
  • roomNumber int Room number. Must be used if probing a position in an overlapping room. Optional.

Returns:

    Probe A new Probe.
Probe(pos, roomNumber, 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.
  • roomNumber int Origin room number.
  • dir Vec3 Direction in which to cast.
  • dist float Distance to cast.

Returns:

    Probe A new Probe.
Probe(pos, roomNumber, 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:

  • pos Vec3 Origin world position to cast from.
  • roomNumber int Origin room number.
  • rot Rotation Rotation defining the direction in which to cast.
  • dist float Distance to cast.

Returns:

    Probe A new Probe.
Probe(pos, roomNumber, 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:

  • pos Vec3 Origin world position to cast from.
  • roomNumber int Origin 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.
Probe:GetPosition()
Get the world position of this Probe.

Returns:

    Vec3 World position.
Probe:GetRoom()
Get the Room object of this Probe.

Returns:

    Room Room object.
Probe:GetRoomName()
Get the room name of this Probe.

Returns:

    string Room name.
Probe:GetRoomNumber()
Get the room number of this Probe.

Returns:

    int Room number.
Probe:GetFloorHeight()
Get the floor height at this Probe.

Returns:

    int Floor height. nil: no floor exists
Probe:GetCeilingHeight()
Get the ceiling height at this Probe.

Returns:

    int Ceiling height. nil: no ceiling exists
Probe:GetWaterSurfaceHeight()
Get the water surface height at this Probe.

Returns:

    int Water surface height. nil: no water surface exists
Probe:GetFloorNormal()
Get the normal of the floor at this Probe.

Returns:

    Vec3 Floor normal. nil: no floor exists
Probe:GetCeilingNormal()
Get the normal of the ceiling at this Probe.

Returns:

    Vec3 Ceiling normal. nil: no ceiling exists
Probe:GetFloorMaterialType()
Get the material type of the floor at this Probe.

Returns:

    MaterialType Floor material type. nil: no floor exists
Probe:GetCeilingMaterialType()
Get the material type of the ceiling at this Probe.

Returns:

    MaterialType Ceiling material type. nil: no ceiling exists
Probe:IsSteepFloor()
Check if the floor at this Probe is steep.

Returns:

    bool Steep floor status. true: is a steep floor, false: isn't a steep floor, nil: no floor exists
Probe:IsSteepCeiling()
Check if the ceiling at this Probe is steep.

Returns:

    bool Steep ceiling status. true: is a steep ceiling, false: isn't a steep ceiling, nil: no ceiling exists
Probe:IsWall()
Check if the Probe is inside a wall. Can be used to determine if a wall and ceiling exist.

Returns:

    bool Wall status. true: is a wall, false: isn't a wall
Probe:IsInsideSolidGeometry()
Check if this Probe is inside solid geometry (below a floor, above a ceiling, inside a bridge, or inside a wall).

Returns:

    bool Inside geometry status. true: is inside, false: is outside
Probe: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 wall, false: isn't climbable
Probe:IsMonkeySwing()
Check if there is a monkey swing sector at this Probe.

Returns:

    bool Monkey swing sector status. true: is a monkey swing, false: isn't a monkey swing
Probe:IsDeath()
Check if there is a death sector at this Probe.

Returns:

    bool Death sector status. true: is a death sector, false: isn't a death sector
Probe:Preview()
Preview this Probe in the Collision Stats debug page.
generated by TEN-LDoc (a fork of LDoc 1.4.6)