SkeletonModification3DLookAt¶
Inherits: SkeletonModification3D < Resource < RefCounted < Object
A modification that rotates a bone to look at a target.
Description¶
This SkeletonModification3D rotates a bone to look a target. This is extremely helpful for moving character's heads to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
Properties¶
|
||
|
||
|
Methods¶
get_additional_rotation ( ) const |
|
get_lock_rotation_plane ( ) const |
|
get_lock_rotation_to_plane ( ) const |
|
void |
set_additional_rotation ( Vector3 additional_rotation ) |
void |
set_lock_rotation_plane ( int plane ) |
void |
set_lock_rotation_to_plane ( bool lock_to_plane ) |
Property Descriptions¶
int bone_index = -2
The bone index of the bone that should be operated on by this modification.
When possible, this will also update the bone_name based on data provided by the Skeleton3D.
String bone_name = ""
The name of the bone that should be operated on by this modification.
When possible, this will also update the bone_index based on data provided by the Skeleton3D.
NodePath target_nodepath = NodePath("")
The NodePath to the node that is the target for the modification.
Method Descriptions¶
Vector3 get_additional_rotation ( ) const
Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes.
int get_lock_rotation_plane ( ) const
Returns the plane that the LookAt modification is limiting rotation to.
bool get_lock_rotation_to_plane ( ) const
Returns whether the LookAt modification is limiting rotation to a single plane in 3D space.
void set_additional_rotation ( Vector3 additional_rotation )
Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result.
void set_lock_rotation_plane ( int plane )
There is currently no description for this method. Please help us by contributing one!
void set_lock_rotation_to_plane ( bool lock_to_plane )
When true
, the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the set_lock_rotation_plane
function.