Preventing jittery following

Get help using Construct 2

Post » Thu Aug 22, 2013 7:33 am

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?
B
3
Posts: 9
Reputation: 193

Post » Thu Aug 22, 2013 7:46 am

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.
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Thu Aug 22, 2013 7:55 am

@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.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Aug 22, 2013 8:05 am

Thanks Imchucho and LittleStain. Such an elegant and simple solution.
B
3
Posts: 9
Reputation: 193

Post » Wed Aug 28, 2013 2:18 pm

I've now implemented a HUD system similar to what is described here: http://www.scirra.com/forum/forum_posts.asp?TID=60238&PID=370258&title=inherited-layer-cross-multiple-layouts#370258 .Layers and still parallax and anchoring is used however the jittering has come back. Any particular reason as to why?
B
3
Posts: 9
Reputation: 193

Post » Wed Aug 28, 2013 2:30 pm

Could be conflicting events, no telling without capx.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 28, 2013 9:57 pm

Thanks. I found that the layers on the level don't have parallax enabled. This seems to affect the objects on the global layout.
B
3
Posts: 9
Reputation: 193


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests