Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DriNeo |
On Godot2 look_at
, the node points with his local y axis, in Godot3 the direction is on his x axis.
I hope my sentence is understandable.
Test by using this script on a a Sprite on Godot3. (turn on the touch emulation)
extends Node2D
func _input(event):
if event is InputEventScreenTouch:
if event.is_pressed():
look_at(event.position)
For Godot2.
extends Node2D
func _input(event):
if event.type == InputEvent.SCREEN_TOUCH:
if event.is_pressed():
look_at(event.pos)
func _ready():
set_process_input(true)
Run the scene and click in the viewport to see the result in Godot 2 then in Godot 3.1