0 like 0 dislike
574 views

I have a very strange problem.

The problem can be reproduced with the following instructions:

UFPS: https://www.assetstore.unity3d.com/en/#!/content/2943

  1. Start a new project
  2. Import UFPS and PopcornFX
  3. Open a new Scene
  4. Create a Plane
  5. Delete the MainCamera
  6. Drag&Drop the Prefab UFPS/Base/Content/Prefabs/Players/Hero into the Scene
  7. Drag&Drop the Prefab UFPS/Base/Content/Prefabs/Pickups/Weapons/PickupPistolLoot into the Scene
  8. Navigate in the Scene Hierarchy to Hero/FPSCamera and delete the GameObject WeaponCamera

  9. Navigate in the Scene Hierarchy to Hero/FPSCamera and add the PKFx Rendering Plugin to the FPSCamera.

  10. 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.
  11. For better Visiblity you should change the ClearFlags from the FPSCamera to a dark Soild Color. A dark plate also helps.
  12. Hit play and now pick up the Weapon. Navigate to Hero/FPSCamera/1PistolTransform/1Pistol/Pistol(Clone)/Muzzle and start the FX.
  13. 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.
  14. You can manuelly move the Muzzle point arround the screen. The Cube will show you the correct Position. But the effect is wandering wrong.
  15. 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.

Regards,

HeiaSamahi

 

EDIT: 

https://www.youtube.com/watch?v=7RkC-jR9kCI&feature=youtu.be

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.

by Heia Samahi (160 points)

2 Answers

1 like 0 dislike
 
Best answer

Hi,

after investigating your project, the issue comes from scripts execution order.

The UFPS plugin forces the script execution order on a few classes, including vp_FPBodyAnimator, which updates the camera location, invalidating emitter transforms.

You can solve this issue by adding an execution script override for the PkFxFX class, as illustrated in the folowing picture:

Script Execution Order

Cheers.

by HugoPKFX (17.5k points)
Oh, this is embarrassing. I've already played around with the Script Execution Order, but only with the rendering plugin Component. Thank you and sorry for the inconvenience.
0 like 0 dislike

Hi,

This sounds like a case of flipped axis.

Are there any image effect components on the camera?
If so, you should tick "has postFX" on the PKFxRenderingPlugin component.

by Raphael (10.6k points)
I've already tried with the Post FX button. But I have no PostFX. There is also no axes flipping since. For a better understanding. It's more like ... as if the frustum do not match. Overall, the effect is moving properly. But in detail it moves wrong. Look at the video that I've added.
Ok, I get what you mean with the video.
Could you send us a small reproduction project in which the bug is present at support@popcornfx.com so we can sort it out?
...