#still tilts

1 messages · Page 1 of 1 (latest)

nova torrent
#

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?

keen parcel
keen parcel
nova torrent
#

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?

keen parcel
nova torrent
#

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

nova torrent
#

Okay, so hmm, it is probably the billboarding of the particles

#

particles will automatically rotate towards the camera view

nova torrent
#

so sometimes when you rotate your camera, it can be weird

nova torrent
#

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

keen parcel
#

ok ill try

#

i made it the child of the gun, but it still doesnt work

#

fixed it

#

Quartenion.identity was the problem

nova torrent
#

really?

#

so just passing the transform.rotation fixed it? With particles?

keen parcel
# nova torrent really?

idk what happened but when i changed Quartenion.identity to Quaternion.LookRotation(mussle.forward, Vector3.up), it worked

strong socket
#

It means `spriteMahybeThat looks like a constructor,Ah.

keen parcel
#

what

nova torrent
nova torrent
#

just saying I am surprised that fixed it