Hello again!
I’ve got a small problem here… I’m trying to do a floating origin setup for my game (to prevent floating point problems).
The idea behind floating origin is that if your target object (usually a spaceship) gets too far away from scene zero (the origin), you move the ship back to scene zero, and displace every other object by the same amount, so that the universe moves around the ship, instead of the ship moving.
This makes it so that floating point errors only occur far away from the player’s position, so you don’t see any distance-related inaccuracies and problems.
Now, there are a few particle emitters in the scene that will have to be moved along in these origin shifts.
The problem is that the emitters are set to ‘simulate in world space’, so their particles won’t move if the emitter moves.
Since these emitters are doing smoke trails, having them simulate in ‘self’ space is not a very good option, since moving the emitter will drag the smoke trail unrealistically along with it (and even worse when you rotate it)
What happens now, when I shift the origin, is that every world-space particle in scene won’t move along with everything else, so you can see a trail of particles ahead of you when the shift happens.
What I need is to be able to shift the emitted particles along with the rest of the ‘universe’… so the shift isn’t noticeable.
Is this at all possible?
I thought about 2 ways of doing it, that hopefully someone here can confirm or disprove before I commit to one of them:
One, write a script to loop through each particle and shift it along. --Might work, but might also be slow.
Two, have the particles simulate in self-space, and by script manipulate the emitter center and orientation. This way, the particles will move when the emitter transform moves. The problem is that I don’t even know if there is a way to shift the emitter center without using it’s transform position.
What do you think?
As always, thanks in advance.
Cheers