Hey.
I posted another post but people edited there replies so i dont know what to do.
In my game, the camera moves when the player reaches halfway across the screen. but, when i open my pause menu the menu isn't in the middle of the screen. is there a way to reset the camera?
[SOLVED] Help with camera
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[SOLVED] Help with camera
Last edited by CrocDev on Sat Jun 14, 2014 12:54 pm, edited 1 time in total.
Re: Help with camera
Look into http://www.love2d.org/wiki/love.graphics.push and http://www.love2d.org/wiki/love.graphics.pop
You need to draw your menu outside of your camera transformations.
You need to draw your menu outside of your camera transformations.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Help with camera
You can also give a look at my camera lib, gamera:
viewtopic.php?f=5&t=12033
In the demo, the "message on the right" (gamera demo: etc etc) is drawn after the cameras are done drawing, so it is not affected. You can adapt that to draw any UI element, including your dialog.
viewtopic.php?f=5&t=12033
In the demo, the "message on the right" (gamera demo: etc etc) is drawn after the cameras are done drawing, so it is not affected. You can adapt that to draw any UI element, including your dialog.
When I write def I mean function.
Re: Help with camera
here its a small example about camera and pause maybe could help you .. menu and pause needs to be out of the camera to work perfect
- Attachments
-
- pause camera.love
- (663.81 KiB) Downloaded 78 times
Re: Help with camera
Thanks to every1 who helped me!!!
Who is online
Users browsing this forum: Ahrefs [Bot], rabbitboots and 9 guests