Documentation

Unity Engine


Unity Engine


PhysicsPlane

Represents a 2D plane.
Read time 1 minuteLast updated 4 hours ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public struct PhysicsPlane

Fields

Value

Description

normalThe plane normal. This must be normalized for the plane to be valid.
offsetThe signed distance from the world origin to the plane, measured along PhysicsPlane.normal. A point lies on the plane when its dot product with the normal equals this offset.

Properties

Property

Description

isValidCheck if the plane is valid. To be valid, the PhysicsPlane.normal must be normalized.

Methods

Method

Description

GetSeparationGet the signed separation of a point from a plane.
ToPositionAndNormalDecompose 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.