Strange particle behaviour




I’m creating a system there a script on a particle system calls the Emit() function with EmitParams being set. However, particles aren’t flying in the set direction. Their trajectory is always directed closer to the player than needed.

After a lot of debugging I found out what the problem is caused by particles colliding with the ground (terrain object). However, they physically can’t collide with it at start because the origin is too high, the collider’s size is too small and the collider messages don’t register any collisions. Additionaly, particles are destroyed when collide with anything except for each other or player. When i’m setting collisions with ground too, everything works as intended (except for terrain penetrating lasers).

I’ve found a lot of solutions, but I want to find a cause of this bug/my error. Everything is in 3D


Purple line is the particle’s trail

You forgot to add Material to Particle Trail

Thanks
However, trail module doesn’t affect collisions (the problem persists after turning trails off)

There’re no issues with the terrain object itself. It can be changed to a cube platform and the problem persists

However, lifting the position of the emitting point does affect the problem positively

There’s no problem with the weapon itself (I replaced it with an empty object and nothing changed)

So apparently the exact solution has been just before my eyes (as always)

Particles weren’t colliding with ground at the start. They were colliding with it halfway and dying due to their radius