Laser misaligned and can't fix

At first, I thought I was a horrible shot, but after closer inspection I noticed that my lasers were off. I looked at the laser prefab and it has a rotation of (90,0,0), which is what I want as it make the laser horizontal. Then I looked at the prefab of the player ship and select a laser and the rotation is still (90,0,0); however, when I look at the viewport, I can see the lasers rotating by a random amount along the x axis (as if there was recoil). No matter how much I rotate the laser, it won’t go straight and it has that recoil-like effect.
Ship-RecoilEffect

I don’t recall seeing this before, so it may be related to when I enabled “Collision” in the laser. I changed “Type” to “World” and changed “Min Kill Speed” to “1”. (Note: even with Min Kill Speed of 1, it still bounces.)

Does anyone know how to fix this?

Hi,

Could you please share screenshots of your Particle System? Maybe gravity is enabled for the particles, or the particles are rotated in the component.

The two buttons in the top horizontal menu bar in Unity are set to “Pivot | Global”, aren’t they?

Here’s screenshots of my particle system:


I don’t believe gravity is turned on; I only see “Gravity Modifier” and it’s set to 0.

In my menu bar, I did it set to Center | Local. I changed it to Pivot | Global, but it didn’t affect my in ability to rotate. Here’s a screenshot of me trying to rotate a laser (using Pivot | Global) and it having no effect:
Pivot-NoEffect

Thank you.

I fixed the issue. Unfortunately, I was making a lot of changes as I wasn’t specifically trying to fix the issue. As far as I can tell, the change that fixed the issue was when I added a Rigidbody to my ship. (I could have sworn it has one already as collisions were working. But when triggers weren’t working, I noticed Rigidbody was missing.)
Thank you.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms