Make Sprite always stay at bottom of the Camera? (Think position: fixed)
intipablo

I'm making a game with an isometric grid (playing field) on which you will cast/throw cards onto, and I'd like a sprite to stay at the bottom of the camera at all times. In my game, I can zoom in and out on the mapĀ for more compatibility with multiple screen sizes, but if I have a sprite at the bottom of the starting screen, I just zoom out or in and it's gone, I'm asking for something like the CSS styling for HTML: position: fixed, bottom: 0px;? Anyway, is this possible?

All 2 Comments
krumza

insert new layer, set to this scalefactor 0

wade.setLayerTransform(YOUR_UI_LAYER_HERE, 0, 0);

and put objects you want to fix at this layer

Gio

Hi initpablo

Like krumza said above, you need a layer with scale and translate set to 0, 0. You can use the command above somewhere in your code (typically in App.init) or, if you are doing this from the editor, you can set the values in the Layer panel (in the Scene Properties on the right-hand side of the screen) like this

Post a reply
Add Attachment
Submit Reply
Login to Reply