Hello! I have a question of how I can make a GUI stop moving with the game camera. I have a room where you are watching from outside in with a flashlight, in between the holes of some planks. I made the planks as a GUI so the flashlight can be behind, and I also made a camera that follows the mouse, since the room is bigger than the game's resolution and you have no character to explore it. This is my code right now
Code: ags
What happens is that the planks are always following the camera, and I want it to stay stationary. I've tried using another camera and viewports, set the position as x=0 and y=0, but still, it keeps on moving. What could I do? Thanks a lot!
function room_Load()
{
gSky.Visible = false; //Make the sky from the previous room not visible
gPlanks.Visible = true; //Make the planks visible
gFlashlight.Visible = true;
mouse.Mode = eModeUsermode1; //Change mouse to flashlight
Game.Camera.Create();
Game.Camera.AutoTracking = false;
}
function hVolver_AnyClick()
{
cJoseph.ChangeRoom(11, 189, 293); //Clicking anywhere to go back
}
function room_RepExec()
{
gFlashlight.SetPosition(mouse.x-640, mouse.y-640); //Positioning the flashlight GUI
Game.Camera.SetAt(mouse.x, mouse.y); //Making the camera following the mouse
}
What happens is that the planks are always following the camera, and I want it to stay stationary. I've tried using another camera and viewports, set the position as x=0 and y=0, but still, it keeps on moving. What could I do? Thanks a lot!