I would need to have a check box on Game Objects to Not inherit rotations.
Also on ParticleFX non of the Orientation modes allow to keep the particles with orientation aligned to world axis, on “default” mode they get the rotation from the emitter. If in game objects could disable the rotation inheritance I could fix this making the particles child of a Game object.
Of course I could update the emitter position every frame to match my game object without being affected by rotations but that’s looks not good…
Regards.
A game object will always additively inherit the transform of parent game objects.
If you don’t want a game object to do this then you could either apply the inverse rotation to cancel out any parent rotation, or perhaps rearrange the hierarchy so that rotation is applied in another branch of the hierarchy.
Depending on your use case, you could also just add another game object as the parent.
• root G.O. -- apply translation here, but not rotation.
- particleFX
• rotating G.O. -- apply rotation here.
- sprite
- ...other rotating components
3 Likes
I had to say that the parent game object was a dynamic physics objects, I couldn’t control its transformations. I was also having problems trying to get relative URLs to communicate two G.O. on the same hierarchy level.
At the end what I did was to set the particles as child on the editor, so I can access easily the URLs and it also follow the parent at Design time, but once at runtime I deattach it from the parent and update the position on every update of the parent. Is working now!
Thanks…
function init(self)
...
particlefx.play("bubbles#bubbles")
go.set_parent("bubbles")
end
on update()
p1 = go.get_world_position()
go.set_position(p1, "bubbles")