Documentation

Unity Engine


Unity Engine


AngularVelocity

Calculate the angular velocity necessary to rotate the current rotation and the specified rotation over a given time.
Read time 1 minuteLast updated a day ago

Definition

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

AngularVelocity(PhysicsRotate, float)

Calculate the angular velocity necessary to rotate the current rotation and the specified rotation over a given time.
public readonly float AngularVelocity(PhysicsRotate rotation, float deltaTime)

Parameters

The rotation used as a calculation to rotate to.

deltaTime

The delta time over which the rotation would take place, in seconds.

Returns

Type

Description

floatThe angular velocity required to rotate to the specified rotation, in radians per second.

AngularVelocity(PhysicsRotate, PhysicsRotate, float)

Calculate the angular velocity necessary to rotate between two rotations over a given time.
public static float AngularVelocity(PhysicsRotate rotationA, PhysicsRotate rotationB, float deltaTime)

Parameters

rotationA

The rotation to rotate from.

rotationB

The rotation to rotate to.

deltaTime

The delta time over which the rotation would take place, in seconds.

Returns

Type

Description

floatThe angular velocity required to rotate between the specified rotations, in radians per second.