+1 vote

So, I want to be able to create a particle effect when the player's sword hits terrain or even another sword. I've already created a particle effect using the Particles2D node but i don't get how to generate these particles at the point of collision. (Also, I've made the sword an Area2D node). Anyone know how to do this?

Godot version 3.3.4-stable
in Engine by (13 points)

I tried similar thing not long ago and discovered that Areas are pretty much useless for detecting percise point of collision. Can You use any Body instead ? Bodies have detailed info about collision and You can get point of two bodies collision

Ok, If I change it to a kinematicbody2d or a rigidbody2d, how can I detect points of collision?

You need to iterate trough getcontactcount and getcontactlocalposition within PhysicsDirectBodyState argument of integrateforces()

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.