ドキュメント

Unity Engine

Unity Engine

ToPositionAndNormal(out Vector2, out Vector2)

Decompose the plane into a point lying on the plane and the plane's normal direction. The position is the point on the plane closest to the world origin.
読み終わるまでの所要時間 1 分最終更新 9日前

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

ToPositionAndNormal(Vector2, Vector2)

public readonly void ToPositionAndNormal(out Vector2 position, out Vector2 normal)

Parameters

position

The point on the plane closest to the world origin.

normal

The plane normal, the same as PhysicsPlane.normal.

Remarks

Use this to pass a plane to APIs that take a position and a normal, such as PhysicsBody.BuoyancyInput.surfacePosition and PhysicsBody.BuoyancyInput.surfaceNormal.