how to get position when a collision hits

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lalel345

when a bullet hits my player, I need to get that position on my player to place a system of particles in the place where the collision entered

Wait, is this for kinematicbody2d or kinematicbody (3d)?
Anyway, couldn’t you just get the bullet’s position instead?

exuin | 2020-09-19 09:04

:bust_in_silhouette: Reply From: lalel345

How do I get the position of the bullet in my kinematicbody3d.
I want to emit blood particles in my player’s position when the bullet collides.

Try transforming the bullet’s global position to the player’s local position with to_local()?

exuin | 2020-09-19 19:53