#Trying To Get Projectile To Move Toward Player
1 messages · Page 1 of 1 (latest)
doesn't seem to be working
velocity = velocity.move_toward(direction, turn_speed * delta```
Null instance means your player variable has nothing in it, meaning it was loaded incorrectly
Can you show the code where you instantiate the player variable? Maybe the path is wrong or something
I don’t if I understood what do you wanna do… do you to make a normal bullet like a bullet that goes from the position where your player was toward?
I'm assuming he means make a homing bazooka from Worms
ohhh
@onready var player: CharacterBody2D = $Player
I'm trying to have a rocket track the player along the x axis, but not the y so if it misses it just fires past it
do I have to preload the player?
What node is this script on? Can you share the scene tree too
Hmm sorry I'm not sure then, maybe someone else can assist
Been fiddling with it for days now and still can't seem to get it to work. I think I might have to give up on this for now
try finding an example of it working from another game