Hi guys and girls.
I wonder if anyone has any experience in adding particle systems to FPS weapons using sockets and notifies?
Me and my collegue tried this feature to attach and trigger particle effects on an FPS weapon during an animation sequence. It worked perfectly in the AnimSet editor preview window but when I checked it in-game the particle system seemed to be offset to the side and did not follow the socket correctly. The rotation worked alright but the translation did not.
We spent hours trying to get this fixed but no success. The weapon is rendered in local space but the particle seems to be rendered in world space because the particle would cut through walls etc if you walk close to them and the weapon doesn't.
Looks like there's no problem when it's being used on environment assets, only FPS weapon etc. Has anyone got this working? We started to wonder if it's possible at all. Any help would be much appreciated.
Replies
http://udn.epicgames.com/Three/ParticleSystemReference.html#Location Modules
Sorry for not being able to show this with a screenshot.
One of our coders added the particle system through code without the use of notifies. It worked fine as long as the player didn't move sideways, because then the particles wouldn't spawn at the socket but to the left of the socket if the player is moving to the left and likewise to the right.
I have limited experience with these sort of things but it seems like it could be a code related problem.
Thanks for the help though
Each camera has it's own coordinate space within the world space. The perspective frustum distorts world space to project onto the 2d plane that is your screen. If you turn off the FOV you get an orthographic projection, so world coords effectively equal screen coords. This generally looks unnatural for a first person game.
A solution is to have 2 effect classes. One for the player to see, and one for everyone else. The players effect will need to be corrected for perspective if you create it in worlds space. You can do this by multiplying it's spawn coordinates by a matrix representing the offset of the camera from the world coordinate system.
There is likely a built in method to unreal for this. Of course if the effect is spawned relative to the camera in it's own view system it should look correct.
We've come up with a temporary solution for the time being though and that is simply to make the particle system less precise so that the spawn area is a bit larger and not so much pinned to one small location. It's not as good looking but it works. We'll settle with that for the moment. If we find a solution I'll make sure to post it here.