skeldjs
    Preparing search index...

    Class PlayerPhysics<RoomType>

    Represents a player object for handling vent entering and exiting.

    See PlayerPhysicsEvents for events to listen to.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    components: NetworkedObject<RoomType, any>[]
    dirtyBit: number = 0

    The dirty state of this component.

    flags: number

    Flags for this object, see SpawnFlag.

    netId: number

    The net ID of this component.

    ownerId: number

    The ID of the owner of this component.

    player: Player<RoomType>

    The player that this component belongs to.

    room: RoomType

    The room that this component belongs to.

    spawnType: SpawnType

    The type of object that this component belongs to.

    ventId: number

    The ID of the vent that the player is currently in.

    Accessors

    Methods

    • Visibly pet your pet or another player's pet.

      Unfortunately, due to technical limitations (as SkeldJS doesn't implement various Unity physics/transform mechanics), there is no good way to get the position of the pet except through manual scuffing, which is out of scope of SkeldJS.

      Parameters

      • playerPos: Vector2

        The position of the player while petting.

      • petPos: Vector2

        The position of the pet to pet.

      Returns Promise<void>