Advertisement
actuallykron

Godot 3.5 - Look at Object

Feb 8th, 2023 (edited)
675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDScript 0.29 KB | Source Code | 0 0
  1. extends StaticBody2D
  2.  
  3. # Get a reference to the player character. This is likely to be different in your project
  4. onready var player = get_parent().get_parent().get_node("PlayerHolder/Player")
  5.  
  6. func _physics_process(delta):
  7.     # Look at the position of the player
  8.     look_at(player.position)
Tags: Godot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement