#still tilts
1 messages · Page 1 of 1 (latest)
is the gameobject that is actually rotating the one with this script on it? Like, the script isn't on some parent object that isn't getting rotated?
and do your muzzle flashes have any code on them that could be causing issues?
the gameobject (gun) is rotating, not the muzzleflash
the only script in my muzzleflash is a selfdestruct one
if you look in the scene with the current code, are your muzzle flashes actually spawning as children of the gun as it rotates?
and, what actually are your muzzle flashes? Are they just sprites?
no
unity particle system
ohh
that makes more sense
go to your particle system
in the top section of options, there should be something like "Simulation Space"
it's probably set to World right now, but if you change it to Local, maybe it would fix the problem
If it is local, then there is something else to look for
its local
Okay, so hmm, it is probably the billboarding of the particles
particles will automatically rotate towards the camera view
billboarding?
so sometimes when you rotate your camera, it can be weird
billboarding is just this
I am actually not sure if there is a good way to get around that happening if you are using particles
you may have to change the way you are doing the muzzle flash
most games will spawn a Sprite for the muzzle flash
and scale it up and down using code
ok ill try
i made it the child of the gun, but it still doesnt work
fixed it
Quartenion.identity was the problem
idk what happened but when i changed Quartenion.identity to Quaternion.LookRotation(mussle.forward, Vector3.up), it worked
It means `spriteMahybeThat looks like a constructor,Ah.
what
that's weird because the particles always rotate to camera, so I wouldn't think particle system rotation would affect it, but I guess if your fix worked, then problem solved
huh
just saying I am surprised that fixed it