Hi there!
My title is probably a bit confusing, because I’ve been stuck with this problem for a while now and words start to make less sense to me!
I made a small dust animation that I instantiate when the player shoots the ground, a wall, etc.
Now my problem is that it’s always facing up.
I’ve been trying to figure out the hit.normal of the collision that my bullet (which is a trigger collider) makes with an object, so it rotates 90 degrees when hitting a wall, 45 degrees when hitting a slope, and so on.
I know how to achieve it with raycasts, but I’m trying to avoid using those for this.
Some people suggested something like ContactPoint2D(.normal), but I’ve never used it and can’t find proper explanation on how to use it, only that something changed about it since Unity 2017 and it doesn’t work like before.
Any suggestions?