system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Drag0n |
The Code:-
extends KinematicBody2D
var motion = Vector2()
func _ready():
pass # Replace with function body.
func _physics_process(delta):
var Player = get_parent(.get_node(“Player”)
*position += (Player.position - position)/50*
look_at (Player.position)
move_and_collide(motion)
in the line position +=(Player.position - position/50 the error is coming how to solve it I
cant understand plz help I am a newbie
system
2
|
|
|
|
Reply From: |
kidscancode |
Look at the line before it - you’re missing a closing )
on get_parent()
.
FYI, in future when you post code here, click the “Code Samples” formatting button and your code will be properly formatted, like this:
extends KinematicBody2D
var motion = Vector2()
func _ready():
pass # Replace with function body.
func physicsprocess(delta):
var Player = getparent(.getnode("Player")
*position += (Player.position - position)/50*
look_at (Player.position)
move_and_collide(motion)