Physics Camera

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Physics Camera

Post by Bannana97 »

Hey all,

I am trying to make a nice terrain using rectangles/polygons - not one of those blocky terrains.
I have a whole Instance system set up so that I can easily modify each of my registered blocks to make that terrain, by setting values like part.Size = Physics.NewSize(32, 32)

Anyhow, I've gotten the parts rendered on screen, and fixtures/bodies created for their shapes. But I want to make a camera now, that can move left/right, to see more of the terrain past screen limits.

This is what I'm thinking: If I were to simply make an offsetX and offsetY, and add them to the rendering positions of the shapes, their bodies would still exist in the old spot. Falling objects, for example, would "render" in their right position when the camera moves, but their bodies will be falling in their old position.

Can someone please explain a good way to go about making a camera? o.e!
User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: Physics Camera

Post by adnzzzzZ »

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Physics Camera

Post by kikito »

There is also gamera: viewtopic.php?f=5&t=12033
When I write def I mean function.
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Re: Physics Camera

Post by Bannana97 »

Hey guys

Thanks for the help... Turns out I had my own camera system from a game a while back - guess I was smarter back then, haha.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests