I have a very strange problem.
The problem can be reproduced with the following instructions:
- Start a new project
- Import UFPS and PopcornFX
- Open a new Scene
- Create a Plane
- Delete the MainCamera
- Drag&Drop the Prefab UFPS/Base/Content/Prefabs/Players/Hero into the Scene
- Drag&Drop the Prefab UFPS/Base/Content/Prefabs/Pickups/Weapons/PickupPistolLoot into the Scene
Navigate in the Scene Hierarchy to Hero/FPSCamera and delete the GameObject WeaponCamera
Navigate in the Scene Hierarchy to Hero/FPSCamera and add the PKFx Rendering Plugin to the FPSCamera.
- Select the Prefab UFPS/Base/Content/Prefabs/Weapons and unfold the Piston Prefab and add the PkFxFx Component to the Muzzle GameObject. Select for example the Thruster Effect.
- For better Visiblity you should change the ClearFlags from the FPSCamera to a dark Soild Color. A dark plate also helps.
- Hit play and now pick up the Weapon. Navigate to Hero/FPSCamera/1PistolTransform/1Pistol/Pistol(Clone)/Muzzle and start the FX.
- Look up and down. You'll see that the effect moving away from the guns muzzle point. For better orientation, you can even add a small cube scaled the Muzzle GameObject. You'll find that the Cube remains correctly in the correct position. The effect wanders up and down.
- You can manuelly move the Muzzle point arround the screen. The Cube will show you the correct Position. But the effect is wandering wrong.
- You can prevent this, by deactivating of the Vp_FP Controllers at the Hero Gameobject.
I do not know why that is related to the player controller.
It is only when the player controller is active and the effect as a child depends on the camera.
Since all Unity own stuff will show up correctly. I think that it is a problem of the PopcornFX Plugin and not of UFPS.
For explanation. The effect and the Purple Cube are on the same GameObject.
Now, if the camera is tilted up and down. You can see the issue clearly. At the end, i move the GameObject itself on the screen.