- Home /
Muzzle flash acting weird
So I have a muzzle flash as a child to my weapon, when I make no modifications to it, it is perfectly aligned to the tip of the barrel. Except when the xrotation of the camera is close to the rotation constraint the flash dissapears but when it reaches the constraint it reappears. this is like a 10 degree area that it is invisible(I don't know why this is happening). Also when I turn the flash into a renderer and set renderer.enabled = true; everything is still fine until I add the code renderer.enabled = false;(so it only appears while shooting) now when the muzzle flash appears it is no longer perfectly alligned and is sitting above the barrel by a lot. This is all on android, in first person. This is in the standard mobile assets>Prefabs>First Person Controls>First Person Controls>Player(where script is, and capsule)>Main Camera>Assault rifle>Mesh &muzzle flash