#Can somebody explain me why the jump pad is not working

1 messages · Page 1 of 1 (latest)

velvet mauve
#
extends Node2D

@export var force = -500.0


func _on_area_2d_area_entered(area):
    if area.get_parent() is Player:
        area.get_parent().velocity.y = force
#

that's the jump pads script

#

I think I've already tried all of the tutorials onn yt and nothing is working

#

but this one is form here

wispy crane
#

have you reproduced the tutorial verbatum before applying it to your own game?

wispy crane
#

I don't think you need to specify area.get_parent() to access the inherited velocity property (you could try putting the jump-pad logic in the jump pad, not via signal to the player?). also how come force is negative, wouldn't that force the player downwards?

plush blade