Voxel Playground Mod Documentation - v0.4.0
    Preparing search index...

    Hierarchy

    • any
      • ModAPI
    Index

    Core

    Character

    Entity

    Vehicle

    Voxel

    Core

    • get ControlledVehicle(): IVehicle

      Gets the vehicle currently controlled by the player.

      Returns IVehicle

    • get ControlledCharacter(): EntityCharacter

      Gets the character currently controlled by the player.

      Returns EntityCharacter

    • get ShowHUD(): boolean

      Returns boolean

    • get OnSceneLoaded(): UnityEvent

      Returns UnityEvent

    • set OnSceneLoaded(value: UnityEvent): void

      Parameters

      • value: UnityEvent

      Returns void

    • get OnSceneUnloaded(): UnityEvent

      Returns UnityEvent

    • set OnSceneUnloaded(value: UnityEvent): void

      Parameters

      • value: UnityEvent

      Returns void

    • Parameters

      • $isLeft: boolean

      Returns Transform

    • Returns Camera

    • Registers a callback that is invoked whenever a character is spawned.

      Parameters

      • $cb: UnityAction$1<EntityCharacter>

      Returns void

    • Unregisters a previously added character-spawn callback.

      Parameters

      • $cb: UnityAction$1<EntityCharacter>

      Returns void

    • Parameters

      • $itemKey: string
      • $pos: Vector3
      • $rot: Quaternion

      Returns GameObject

    • Plays a one-shot sound identified by key at a world position.

      Parameters

      • $soundKey: string
      • $pos: Vector3
      • Optional$mixerType: SoundMixerType

      Returns void

    • Parameters

      • $materialId: number
      • $hitPoint: Vector3
      • Optional$volume: number

      Returns void

    • Plays a sound event on a target transform.

      Parameters

      • $soundEvent: SoundEvent
      • $target: Transform
      • Optional$mixerType: SoundMixerType

      Returns void

    • Plays a sound event at a world position using the supplied transform as the playback owner.

      Parameters

      • $soundEvent: SoundEvent
      • $emitter: Transform
      • $pos: Vector3
      • Optional$mixerType: SoundMixerType

      Returns void

    • Parameters

      • $soundEvent: SoundEvent
      • $target: Transform

      Returns void

    • Parameters

      • $soundEvent: SoundEvent
      • $target: Transform

      Returns boolean

    • Pushes a background music event onto the active BGM stack.

      Parameters

      • $soundEvent: SoundEvent
      • Optional$priority: BgmPriority

      Returns void

    • Pops a background music event from the active BGM stack.

      Parameters

      • $soundEvent: SoundEvent
      • Optional$priority: BgmPriority

      Returns void

    • Parameters

      • $effectKey: string
      • $pos: Vector3
      • Optional$scale: number

      Returns GameObject

    • Parameters

      • $message: string

      Returns void

    Character

    • Gets all active EntityCharacter instances currently registered in the entity manager.

      Returns Array$1<EntityCharacter>

      An array of active characters, or an empty array when none are available.

    • Gets all characters within the specified radius of a world-space position.

      Parameters

      • $center: Vector3
      • $radius: number

      Returns Array$1<EntityCharacter>

      An array of characters found in range, or an empty array when none are found.

    • Gets the visible model GameObject for a character.

      Parameters

      • $ch: EntityCharacter

      Returns GameObject

      The model object, or null if the character is invalid.

    • Gets a named body rigidbody from a character rig.

      Parameters

      • $ch: EntityCharacter
      • $bodyName: string

      Returns PxRigidBody

      The matching rigidbody, or null if the body cannot be resolved.

    • Attaches a new ConfigurableJoint to a character body and connects it to another rigidbody.

      Parameters

      • $ch: EntityCharacter
      • $connectedBody: PxRigidBody
      • Optional$bodyName: string

      Returns PxD6Joint

      The created joint, or null if the attachment point cannot be resolved.

    • Determines whether a rigidbody belongs to the specified character rig.

      Parameters

      • $ch: EntityCharacter
      • $rb: PxRigidBody

      Returns boolean

      true if the rigidbody is part of the character; otherwise, false.

    • Determines whether the character is currently carrying the specified rigidbody as an item.

      Parameters

      • $ch: EntityCharacter
      • $rb: PxRigidBody

      Returns boolean

      true if the rigidbody is carried by the character; otherwise, false.

    • Determines whether the character is grounded.

      Parameters

      • $ch: EntityCharacter

      Returns boolean

      true if the character is grounded; otherwise, false.

    • Sets whether the character is in a "hanging" state (externally held while airborne).

      Parameters

      • $ch: EntityCharacter
      • $hanging: boolean

      Returns void

    • Gets the current velocity of a character.

      Parameters

      • $ch: EntityCharacter

      Returns Vector3

      The main rigidbody velocity, or Vector3.zero if unavailable.

    • Sets the character movement velocity.

      Parameters

      • $ch: EntityCharacter
      • $v: Vector3

      Returns void

    • Adds velocity or force to a character's main rigidbody.

      Parameters

      • $ch: EntityCharacter
      • $v: Vector3
      • Optional$mode: any

      Returns void

    • Adds force or velocity to the character motion driver so the whole character moves coherently.

      Parameters

      • $ch: EntityCharacter
      • $v: Vector3
      • Optional$mode: any

      Returns void

    • Teleports a character to the specified position and rotation.

      Parameters

      • $ch: EntityCharacter
      • $pos: Vector3
      • $rot: Quaternion

      Returns void

    • Gets the current state from the character state machine.

      Parameters

      • $ch: EntityCharacter

      Returns State

      The active state, or null if no state machine is available.

    • Registers a callback that is invoked whenever the character state changes.

      Parameters

      • $ch: EntityCharacter
      • $cb: UnityAction$1<State>

      Returns void

    • Unregisters a previously added character state change callback.

      Parameters

      • $ch: EntityCharacter
      • $cb: UnityAction$1<State>

      Returns void

    • Registers a callback that is invoked whenever the character AI action changes.

      Parameters

      • $ch: EntityCharacter
      • $cb: UnityAction$1<AIAction>

      Returns void

    • Unregisters a previously added AI action change callback.

      Parameters

      • $ch: EntityCharacter
      • $cb: UnityAction$1<AIAction>

      Returns void

    Entity

    • Gets the main rigidbody for an entity.

      Parameters

      • $e: Entity

      Returns PxRigidBody

      The primary rigidbody, or null if unavailable.

    • Gets all rigidbodies owned by an entity.

      Parameters

      • $e: Entity

      Returns Array$1<PxRigidBody>

      An array of rigidbodies, or an empty array if the entity is invalid.

    • Gets the connected entity group represented by the specified entity.

      Parameters

      • $e: Entity

      Returns Array$1<Entity>

      An array of connected entities, or an empty array if the entity is invalid.

    • Sets whether an entity is pinned in place.

      Parameters

      • $e: Entity
      • $pinned: boolean

      Returns void

    • Sets whether gravity is enabled for an entity.

      Parameters

      • $e: Entity
      • $enabled: boolean

      Returns void

    • Activates or deactivates an entity.

      Parameters

      • $e: Entity
      • $active: boolean

      Returns void

    • Determines whether an entity is currently activated.

      Parameters

      • $e: Entity

      Returns boolean

      true if activated; otherwise, false.

    • Sets whether an entity is visible.

      Parameters

      • $e: Entity
      • $visible: boolean

      Returns void

    • Teleports an entity to a world transform.

      Parameters

      • $e: Entity
      • $pos: Vector3
      • $rot: Quaternion

      Returns void

    • Registers a callback invoked when a weapon trigger is pressed.

      Parameters

      • $w: EntityFirableWeapon
      • $cb: Action

      Returns void

    • Unregisters a previously added weapon trigger-pressed callback.

      Parameters

      • $w: EntityFirableWeapon
      • $cb: Action

      Returns void

    • Registers a callback invoked when a weapon trigger is released.

      Parameters

      • $w: EntityFirableWeapon
      • $cb: Action

      Returns void

    • Unregisters a previously added weapon trigger-released callback.

      Parameters

      • $w: EntityFirableWeapon
      • $cb: Action

      Returns void

    • Registers a callback invoked when a hold weapon fires.

      Parameters

      • $w: EntityHoldWeapon
      • $cb: Action

      Returns void

    • Unregisters a previously added hold-weapon fired callback.

      Parameters

      • $w: EntityHoldWeapon
      • $cb: Action

      Returns void

    • Simulates trigger state changes on a firable weapon.

      Parameters

      • $w: EntityFirableWeapon
      • $pressed: boolean

      Returns void

    • Gets the weapon reload or readiness fraction.

      Parameters

      • $w: EntityFirableWeapon

      Returns number

      The reload fraction in the range [0, 1], or 0 if the weapon is invalid.

    • Determines whether a weapon currently has ammunition.

      Parameters

      • $w: EntityFirableWeapon

      Returns boolean

      true if the weapon has ammo; otherwise, false.

    • Gets the current ammunition count for a weapon.

      Parameters

      • $w: EntityFirableWeapon

      Returns number

      The current ammo count, or 0 if the weapon is invalid.

    • Gets the ammunition capacity for a weapon.

      Parameters

      • $w: EntityFirableWeapon

      Returns number

      The ammo capacity, or 0 if the weapon is invalid.

    Vehicle

    • Gets the transform for a vehicle.

      Parameters

      • $vehicle: IVehicle

      Returns Transform

      The vehicle transform, or null if unavailable.

    • Gets the center-of-mass transform for a vehicle.

      Parameters

      • $vehicle: IVehicle

      Returns Transform

      The center-of-mass transform, or null if unavailable.

    • Gets the primary door-handle transform for a vehicle.

      Parameters

      • $vehicle: IVehicle

      Returns Transform

      The door-handle transform, or null if unavailable.

    • Determines whether a vehicle is in an exploded or destroyed driving state.

      Parameters

      • $vehicle: IVehicle

      Returns boolean

      true if the vehicle is exploded; otherwise, false.

    • Determines whether vehicle yaw should rotate with the controlled camera.

      Parameters

      • $vehicle: IVehicle

      Returns boolean

      true if yaw rotation should be coupled; otherwise, false.

    • Enables or disables the vehicle engine state.

      Parameters

      • $vehicle: IVehicle
      • $enabled: boolean

      Returns void

    • Applies throttle input to a vehicle.

      Parameters

      • $vehicle: IVehicle
      • $throttle: number

      Returns void

    • Applies brake input to a vehicle.

      Parameters

      • $vehicle: IVehicle
      • $brake: number

      Returns void

    • Applies steering input to a vehicle.

      Parameters

      • $vehicle: IVehicle
      • $steering: Vector4

      Returns void

    • Triggers the vehicle's ability action.

      Parameters

      • $vehicle: IVehicle

      Returns void

    • Determines whether the supplied vehicle is a proxy-backed vehicle that can be configured through ModAPI.

      Parameters

      • $vehicle: IVehicle

      Returns boolean

      true if the vehicle is a VehicleProxy; otherwise, false.

    • Clears all callback bindings on a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle

      Returns void

    • Binds the exploded-state getter for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Func$1<boolean>

      Returns void

    • Binds the yaw-rotation capability getter for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Func$1<boolean>

      Returns void

    • Binds the engine-enabled handler for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Action$1<boolean>

      Returns void

    • Binds the throttle handler for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Action$1<number>

      Returns void

    • Binds the brake handler for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Action$1<number>

      Returns void

    • Binds the steering handler for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Action$1<Vector4>

      Returns void

    • Binds the ability-pressed handler for a proxy-backed vehicle.

      Parameters

      • $vehicle: IVehicle
      • $cb: Action

      Returns void

    Voxel

    • Demolishes a spherical region of a voxel object and optionally applies fragment force.

      Parameters

      • $voxel: VoxelDestructor
      • $center: Vector3
      • $radius: number
      • Optional$force: number
      • Optional$explodeDirection: any
      • Optional$spreadAngle: number
      • Optional$maxFragments: number
      • Optional$hardnessCap: number

      Returns void

    • Clears voxels along a screen-space line within a specific voxel chunk.

      Parameters

      • $voxel: VoxelDestructor
      • $screenA: Vector2
      • $screenB: Vector2
      • $worldToScreen: Matrix4x4
      • $chunk: VoxelChunk

      Returns void

    • Explodes a voxel object into parts and destroys the original object.

      Parameters

      • $voxel: VoxelDestructor
      • Optional$specialEffect: boolean
      • Optional$randomRemoval: boolean

      Returns void

    • Modifies a specific voxel property within a spherical world-space region.

      Parameters

      • $voxel: VoxelDestructor
      • $center: Vector3
      • $radius: number
      • Optional$property: Property

      Returns void

    • Projects a decal texture onto voxel colors and related voxel surface properties.

      Parameters

      • $voxel: VoxelDestructor
      • $center: Vector3
      • $radius: number
      • $decalTexture: Texture2D
      • $projectDirection: Vector3
      • $projectDepth: number
      • Optional$splatType: SplatType
      • Optional$opacity: number

      Returns void

    • Gets the current solid voxel count for a voxel volume.

      Parameters

      • $voxel: VoxelVolume

      Returns number

      The number of currently solid voxels, or 0 if the volume is invalid.

    • Gets the original solid voxel count recorded for a voxel volume.

      Parameters

      • $voxel: VoxelVolume

      Returns number

      The original number of solid voxels, or 0 if the volume is invalid.

    • Gets the remaining solid voxel ratio for a voxel volume.

      Parameters

      • $voxel: VoxelVolume

      Returns number

      The current solid ratio, or 0 if the volume is invalid.

    • Registers a callback that is invoked whenever the voxel volume is modified.

      Parameters

      • $voxel: VoxelVolume
      • $cb: Action$1<VoxelVolume>

      Returns void

    • Unregisters a previously added voxel-modified callback.

      Parameters

      • $voxel: VoxelVolume
      • $cb: Action$1<VoxelVolume>

      Returns void

    • Registers a callback that is invoked whenever the voxel object creates fragments.

      Parameters

      • $voxel: VoxelDestructor
      • $cb: Action$3<VoxelDestructor, VoxelDestructor, NativeSlice$1<number>>

      Returns void

    • Unregisters a previously added voxel-fragmented callback.

      Parameters

      • $voxel: VoxelDestructor
      • $cb: Action$3<VoxelDestructor, VoxelDestructor, NativeSlice$1<number>>

      Returns void

    • Determines whether a voxel object is currently destructible.

      Parameters

      • $voxel: VoxelDestructor

      Returns boolean

      true if the voxel object can currently be destroyed; otherwise, false.

    • Sets whether a voxel object is destructible.

      Parameters

      • $voxel: VoxelDestructor
      • $destructible: boolean

      Returns void

    • Determines whether a voxel object is currently marked as unyielding.

      Parameters

      • $voxel: VoxelDestructor

      Returns boolean

      true if the voxel object is unyielding; otherwise, false.

    • Enables or disables the unyielding state for a voxel object.

      Parameters

      • $voxel: VoxelDestructor
      • $unyielding: boolean

      Returns void

    • Sets whether a voxel object is fortified.

      Parameters

      • $voxel: VoxelDestructor
      • $fortified: boolean

      Returns void

    • Clears voxels inside a cylindrical region swept between two world-space endpoints.

      Parameters

      • $voxel: VoxelDestructor
      • $end1: Vector3
      • $end2: Vector3
      • $radius: number

      Returns void

    • Clears voxels within a box-shaped sweep constrained to a specific chunk.

      Parameters

      • $voxel: VoxelDestructor
      • $end1: Vector3
      • $end2: Vector3
      • $halfBox: Vector3
      • $boxLocalToWorld: Matrix4x4
      • $chunk: VoxelChunk
      • Optional$hardnessCap: number

      Returns void

    • Restores voxel colors from their stored original color state.

      Parameters

      • $voxel: VoxelDestructor

      Returns void

    • Gets the voxel material identifier sampled at a world-space position.

      Parameters

      • $voxel: VoxelVolume
      • $worldPos: Vector3

      Returns PointDataV2

      The voxel data at the queried position.

    • Gets the voxel material identifier sampled at a local voxel-space position.

      Parameters

      • $voxel: VoxelVolume
      • $localPos: Vector3Int

      Returns PointDataV2

      The voxel data at the queried position.

    • Gets the voxel material identifier for a physics raycast hit.

      Parameters

      • $hit: RaycastHit

      Returns PointDataV2

      The voxel data at the hit point.

    • Gets the voxel face render target associated with a character head rig.

      Parameters

      • $ch: EntityCharacter

      Returns VoxelVolume

      The face render target voxel volume, or null if none can be resolved.

    • Sets the face-rendering properties on a voxel face render target.

      Parameters

      • $target: VoxelVolume
      • $material: Material
      • $animationEnable: boolean
      • $direction: number
      • $depth: number

      Returns void

    • Parameters

      • $collider: PxCollider

      Returns boolean

    "[___keep_incompatibility]": never