Floating (Frozen) Menus
cap

Hi,

 

Do you have any tips for making static wade app objects (i.e. menus, UIs) while using camera zoom and world coordinates pan? I tried defining a menu function and adding a position attribute (like sg_misc_stuff did in Laberinto, @sg_misc_stuff thanks!), but directly tracing back the camera zoom and pan movements in order to keep the menu static. The problem with this approach (without using onResize like sg_misc_stuff did) is that one can notice the lag in the wade objects when zooming and paning. 

 

Could you share another strategy? Maybe something as easy as and "except"? thanks!

All 2 Comments
Gio

You can (and probably should) put your UI objects on a separate layer. Say that you put them all on layer 5 for example (choose a low number so that they appear in front of other objects). 

 

Then you must tell WADE that you want layer 5 to be static, and not move or scale when the camera moves. So somewhere near the beginning of your init function, you can do this:

wade.setLayerTransform(5, 0, 0);

Hopefully it should be as simple as that :)

cap

Great thanks! I had it all upside down and did really not see see wade.setLayerTransform(layer, 0, 0) for making layers static coming...

Post a reply
Add Attachment
Submit Reply
Login to Reply