Topic was automatically imported from the old Question2Answer platform.
Asked By
brylie
When using the look_at method on Node2D, the node is rotated immediately. This is somewhat unnatural, and would be nicer as a smooth transition. How can I smoothen the rotation when using Node2D.look_at()?
I don’t think you can smooth it using look_at() but, knowing the starting and final angles of rotation, you could do that using a Tween and by calling interpolate_property on the rotation property of your node.
That way you get to specify the time and the easing methods to better tweak the result.
Cool. Great suggestion!
I also added an issue on GitHub, where we can discuss improving the expressiveness of the look_at function with an added ‘tween’ argument.