Physics3DQueries class final
Rays, sweeps and overlaps against a PhysicsWorld3D, answered in
entities. Physics3D.queries is one.
Before the system has made its world (no 3-D body yet) every query finds nothing.
Every query takes a layer mask (one bit per layer; all by default), an entity to pass over (the one asking, say), and whether sensors count (not by default).
Constructors
- Physics3DQueries(PhysicsSystem3D system)
-
Queries on
system's world, naming entities through it.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- system → PhysicsSystem3D
-
Steps the world asked, and knows which entity owns which body.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlap(
Shape3D shape, Vector3 position, Quaternion rotation, {int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → List< Entity> -
The entities whose bodies
shapeatpositionandrotationoverlaps. -
overlapBox(
Vector3 center, Vector3 halfExtents, {Quaternion? rotation, int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → List< Entity> -
The entities whose bodies a box of
halfExtentsatcenteroverlaps. -
overlapSphere(
Vector3 center, double radius, {int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → List< Entity> -
The entities whose bodies a sphere at
centeroverlaps. -
raycast(
Vector3 origin, Vector3 direction, {double maxDistance = 1000, int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → PhysicsHit3D? -
The first thing a ray from
originalongdirectionhits withinmaxDistance, or null. -
raycastAll(
Vector3 origin, Vector3 direction, {double maxDistance = 1000, int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → List< PhysicsHit3D> -
Everything a ray hits within
maxDistance, nearest first. -
shapeCast(
Shape3D shape, Vector3 position, Quaternion rotation, Vector3 direction, {double maxDistance = 1000, int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → PhysicsHit3D? -
The first thing
shapeswept frompositionandrotationalongdirectionhits withinmaxDistance, or null. -
sphereCast(
Vector3 origin, double radius, Vector3 direction, {double maxDistance = 1000, int layerMask = 0xFFFF, Entity? ignore, bool includeSensors = false}) → PhysicsHit3D? -
The first thing a sphere of
radiusswept fromoriginalongdirectionhits withinmaxDistance, or null (a camera keeping out of walls, a thick bullet). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited