Godot 3 NonExistent function get_rotd()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By velocity_zee

Trying to do a lerp:

var do_rot = lerp(get_rotd(), target_do_rot, 0.3)

get_rotd() worked in Godot 2 but is not recognized in 3. get_rot() isn’t recognized either.

First time asking a question. Seems i cant enter underscores here, they get edited out. Strange for somewhere code would be expected.

Edited your post so that code isn’t mashed by the website.
You need to either indent it with 4 spaces or use backticks (or, use the code button in the post editor).

Zylann | 2018-06-06 12:45

:bust_in_silhouette: Reply From: Zylann

These functions got renamed in Godot 3. They are now named get_rotation_degrees().
But you can also use the property shortcut rotation_degrees:

var do_rot = lerp(rotation_degrees, target_do_rot, 0.3)