JakeCake Posted January 15, 2015 Share Posted January 15, 2015 I would like to place my UI elements on top of all other sprites/groups. My current approach was to add a new group, place this on top of everything else and set fixedToCamera = true, but this gives me a weird result. Everything in this group does seem to be placed differently, and more fixedToCamera than some other stuff, but all the transformation I've done to the master "world" group seem to also apply to this group. How can I truly add UI graphics to the game without any previous matrices/translations applied to them, so they are placed solely in camera-space. I realise I could add another layer of group over everything else and then treat one of them as the world, and have everything but UI in this group, but that would leave me with two groups called "world". Though, this is going to be my solution unless there's an easy fix available. Perhaps I am just using fixedToCamera wrong? Link to comment Share on other sites More sharing options...
CtlAltDel Posted January 16, 2015 Share Posted January 16, 2015 You should probably add 2 groups to the game1. uigroup2. worldgroup make the uigroup elements fixed to camera and add all world related groups to the worldgroup, and make sure you transform the worldgroup Link to comment Share on other sites More sharing options...
JakeCake Posted January 16, 2015 Author Share Posted January 16, 2015 You should probably add 2 groups to the game1. uigroup2. worldgroup make the uigroup elements fixed to camera and add all world related groups to the worldgroup, and make sure you transform the worldgroup I thought so, it just seems really weird to me that something "fixedToCamera" would be transformed with the world. Guess I'll have to do it this way, which isn't much of a problem if only I had known from the start. I was hesitant because this is going to be problematic this far into the development process. Anyways, I'll get right on it, thanks for the answer. Link to comment Share on other sites More sharing options...
Recommended Posts