Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AngularVelocity

Calculate the angular velocity necessary to rotate the current rotation and the specified rotation over a give time.
Read time 1 minuteLast updated 10 days 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 give 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.

Returns

Type

Description

floatThe angular velocity required to rotate to the specified rotation.

AngularVelocity(PhysicsRotate, PhysicsRotate, float)

Calculate the angular velocity necessary to rotate between two rotations over a give 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.

Returns

Type

Description

floatThe angular velocity required to rotate between the specified rotations.