I have a HUD on my game which needs to overlay the current viewport. I have an event set so every tick the HUD is set to be at ViewportTop, ViewportLeft. However, as I move along they follow properly, but it seems to jitter a lot. Is there a reason for this?
Make a new layer, put the hud obejects there, make that layer the top one ans set its parallax to 0,0. This way it will follow smoothly and you dont need extra events.
Imchucho, that will work, except when using scale inner or scale outer.
To be able to get the hud to stay relative to the viewport when using one of those scales, make the parallax 0,0 and use the anchor behaviour.
Develop games in your browser. Powerful, performant & highly capable.
Thanks Imchucho and LittleStain. Such an elegant and simple solution.
I've now implemented a HUD system similar to what is described here: scirra.com/forum/forum_posts.asp .Layers and still parallax and anchoring is used however the jittering has come back. Any particular reason as to why?
Could be conflicting events, no telling without capx.
Thanks. I found that the layers on the level don't have parallax enabled. This seems to affect the objects on the global layout.