0 votes

So here's a little bit of context. I want to emit a particle right after you jump and it is on floor. I created a raycast2d that is downward toward the player and check the collision point. I then Assign the position of my particle equal to collision point. Here is the code of my jump state

func handle_input(host,delta):
var Collision_point = get_node("../../RayCast2D").get_collision_point()
get_node("../..").Player.y = Jump_Force
get_node("../../Cloud").position = Collision_point
get_node("../../Cloud").emitting = true
return "Idle"

My problem is the particle itself disappears. I tried checking the position of the cloud and the floor and it is congruent.

Guys help me lol, if there is something that is wrong in my method or anything , just comment

Godot version 3.2.3
in Engine by (387 points)

1 Answer

0 votes

could be you are confusing global and local position, try printing the position and check if the result is what you were expecting

by (1,514 points)
edited by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.