Repository navigation
API Class Physics
Defined in: src/plugins/physics/runtime/Physics.ts:57
3D physics queries and settings for the current World (ADR 0005, 0032, 0045), the counterpart of Physics2D. Each World has its own physics world; queries never see another World's colliders.
new Physics(): Physics;Physics
get static gravity(): Vector3;Defined in: src/plugins/physics/runtime/Physics.ts:58
set static gravity(g): void;Defined in: src/plugins/physics/runtime/Physics.ts:62
void
static boxCast(
center,
halfExtents,
direction,
orientation?,
maxDistance?,
layers?
): ShapeCastHit | null;Defined in: src/plugins/physics/runtime/Physics.ts:94
Sweep a box (centre, half extents, optional orientation) along direction.
Quaternion = Quaternion.identity
number = Number.MAX_VALUE
string[]
ShapeCastHit | null
static capsuleCast(
point1,
point2,
radius,
direction,
maxDistance?,
layers?
): ShapeCastHit | null;Defined in: src/plugins/physics/runtime/Physics.ts:99
Sweep a capsule, given its two cap centres, along direction.
number
number = Number.MAX_VALUE
string[]
ShapeCastHit | null
static checkSphere(
center,
radius,
layers?
): boolean;Defined in: src/plugins/physics/runtime/Physics.ts:121
True if any collider overlaps the sphere.
number
string[]
boolean
static overlapBox(
center,
halfExtents,
orientation?,
layers?
): Collider[];Defined in: src/plugins/physics/runtime/Physics.ts:110
Every collider overlapping a box (centre, half extents, optional orientation).
Quaternion = Quaternion.identity
string[]
Collider[]
static overlapCapsule(
point1,
point2,
radius,
layers?
): Collider[];Defined in: src/plugins/physics/runtime/Physics.ts:115
Every collider overlapping a capsule, given its two cap centres.
number
string[]
Collider[]
static overlapSphere(
center,
radius,
layers?
): Collider[];Defined in: src/plugins/physics/runtime/Physics.ts:105
Every collider overlapping a sphere.
number
string[]
Collider[]
static raycast(
origin,
direction,
maxDistance?,
layers?
): RaycastHit | null;Defined in: src/plugins/physics/runtime/Physics.ts:67
Cast a ray; optionally restrict hits to the named layers.
number
string[]
RaycastHit | null
static raycast(
ray,
maxDistance?,
layers?
): RaycastHit | null;Defined in: src/plugins/physics/runtime/Physics.ts:69
Cast a Ray, such as camera.screenPointToRay(Input.mousePosition) (ADR 0073).
number
string[]
RaycastHit | null
static sphereCast(
origin,
radius,
direction,
maxDistance?,
layers?
): ShapeCastHit | null;Defined in: src/plugins/physics/runtime/Physics.ts:89
Sweep a sphere along direction; returns the first collider hit.
number
number = Number.MAX_VALUE
string[]
ShapeCastHit | null
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference