|Note: This feature is for ZScript only.|
bool CheckPosition(Vector2 pos[, bool actorsonly[, FCheckPosition tm]])
Checks if the Actor is colliding with anything at the given position. Will only check for lines and actors.
- pos - The xy position to check at. This is not relative to the Actor.
- actorsonly - False by default. If true, ignores any lines.
- tm - null by default. Contains information related to the check at the position.
Returns true if nothing is blocking the Actor at the position.
FCheckPosition contains information about the move that was performed. This includes:
- Actor thing - The actor that was trying to move (in this case, the caller).
- Vector3 pos - pos and the caller's current z.
- Sector cursector - The sector located at pos.
- double floorz - The z of the floor below the caller at pos. If the caller is stepping on top of another actor then this is the top of that actor.
- double ceilingz - The z of the ceiling above the caller at pos.
- double dropoffz - The lowest z the caller could reach at pos.
- TextureID floorpic - The TextureID of the floor below the caller at pos.
- int floorterrain - The id of the floor terrain below the caller at pos.
- Sector floorsector - The sector below the one at pos if portals were involved. Otherwise the same as cursector.
- TextureID ceilingpic - The TextureID of the ceiling above the caller at pos.
- Sector ceilingsector - The sector above the one at pos if portals were involved. Otherwise the same as cursector.
- bool touchmidtex - True if the caller touched a 3D mid texture at pos.
- bool abovemidtex - True if the caller was above a 3D mid texture at pos.
- bool floatok - If true, the caller can freely move up and down if it floats.
- bool FromPMove - If true, handles non-players overlapping on top of each other.
- line ceilingline - The line the caller collided with that acted as a portal.
- Actor stepthing - The actor the caller stepped on if any.
- bool DoRipping - If true, the caller is treated like a RIPPER.
- bool portalstep - True if the move to pos went through a portal.
- int portalgroup - The index of the portal group the move went through if it did.
- int PushTime - Sets the caller's lastPush field to this value if it reaches a pushable object. Used to track which callers have already pushed that tic.
- void ClearLastRipped() - Clears information about actors that were already ripped through. Normally an actor is only ripped once per tic.
|Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.|