Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsQuery.WorldMoverInput

The world mover arguments used by the world mover.
Read time 2 minutesLast updated 10 days ago

Definition

public struct PhysicsQuery.WorldMoverInput : IEquatable<PhysicsQuery.WorldMoverInput>

Constructors

Constructor

Description

WorldMoverInput()Create a default world mover input.

Properties

Property

Description

castFilterThe filter to use for checking casts. The advantage of a separate filter to _overlapFilter is that you can check for overlaps in a different way to what you can hit when moving. For instance, you may or may not want to check for other movers in they existing in the world when moving but you want to always check them for overlap initially.
collisionResultsWhether to return all the individual PhysicsShape.MoverCollision results for all iterations or not. All the collisions will be returned in the PhysicsQuery.WorldMoverResult results.
geometryThe mover geometry to use when checking for overlaps and casting.
maxIterationsSolving a movement is iterative and will continue until the maximum allowed iterations has been achieve, controlled by this value. The maximum allowed iterations will not always be used and solving will cease if the iteration movement falls below the square of the _moveTolerance.
moveToleranceSolving a movement will cease if the movement falls below the square of this value. By default, this value is extremely small. Too high a value will result in solving ceasing too quickly, too small will result in all allowed _maxIterations being used.
overlapFilterThe filter to use for checking overlaps.
targetPositionThe position desired for the mover to achieve. This is typically calculated using the current velocity, any gravity required and time-integrated by the simulation time-step (delta-time).
transformThe transform used to transform the geometry i.e. the mover starting pose.
velocityThe velocity used to calculate the _targetPosition. This is not used for movement but it will be returned, modified by any surfaces hit. This velocity can then be used in subsequent inputs for movement.

Static Properties

Property

Description

defaultInputCreate a default world mover input.