ドキュメント

Unity Engine

Unity Engine

PhysicsQuery.CastResult

Cast result when performing ray-cast or shape-cast queries against geometry.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public readonly struct PhysicsQuery.CastResult

Properties

Property

Description

fractionThe fraction of the input translation at collision in the range (0 to 1).
hitReturns if the cast hit i.e. if the output is valid or not.
iterationsThe number of iterations used in the calculation.
normalThe surface normal at the point of contact. In all non-overlapped cases, this will be a unit-normal. If there was an initial overlap, the normal will be zero (degenerate) along with the PhysicsQuery.CastResult.fraction being zero.
pointThe point of contact.

Operators

Operator

Description

boolImplicitly convert the cast output to a bool using the value in the PhysicsQuery.CastResult.hit flag.