Move Rotation 2D

Node description and basic instructions

Rotates the Rigidbody to angle (given in degrees).

Rotates the Rigidbody to the specified angle by calculating the appropriate angular velocity required to rotate the Rigidbody to that angle during the next physics update. During the move, angular drag won't affect the body. This causes the object to rapidly move from the existing angle to the specified angle. Because this feature allows a Rigidbody to be rotated rapidly to the specified angle, any colliders attached to the Rigidbody will react as expected i.e. they will produce collisions and/or triggers. This also means that if the colliders produce a collision then it will affect the Rigidbody movement and potentially stop it from reaching the specified angle during the next physics update. If the Rigidbody is kinematic then any collisions won't affect the Rigidbody itself and will only affect any other dynamic colliders.

Rigidbody2D components have a fixed limit on how fast they can rotate therefore attempting to rotate large angles over short time-scales can result in the Rigidbody not reaching the specified angle during the next physics update. It is recommended that you use this for relatively small rotational movements only.

To create it, right-click on free space in AI Tree inspector and select Create Node/Tasks/Rigidbody2D/Move Rotation 2D.

This task node has a number of fields, that are highlighted in picture below.

Fields

NameDescription

Node Name

Name of node

Ignore Abort Self

Whether node ignores abort self or not

Target

Target to which force is added

Rotation

New rotation for the Rigidbody

Last updated