top down camera
Posted: Wed Sep 05, 2012 12:34 pm
Hello lovely people!
I've been messing around with making my first project in love, using physics, and I've got a physics character moving round by applying forces to it (not sure if this is the best way to do it, but, sod it, it was fun learning).
Now, what i want to do is get the character running round in a level (I've been messing around with the stuff from the tile based tutorials for that). Thing is, I'm new to this kind of thing and I'm stumped as to how to get the camera to lock on to the player character as it moves around the level (i want him center screen).
Do i somehow lock the camera view to the player's position as he moves around (which i have no idea how to do)? Or do i move the world around the player (seems a faff to me)? I'm struggling to figure out where to start on this... Can anyone suggests techniques, tutorials or generally give me a bit of a backrub and slice of tasty cake?
I'm planning to have decent sized levels and i'd like to have all the characters physics driven (enemies, player, spells he casts - is this an insane idea?)
Please excuse the absolute mess of commented out code in there and the general carcrash of code that it is - I've been struggling with the collision checking code, so for this, i cut it and everything to do with it, out
Cheers
I've been messing around with making my first project in love, using physics, and I've got a physics character moving round by applying forces to it (not sure if this is the best way to do it, but, sod it, it was fun learning).
Now, what i want to do is get the character running round in a level (I've been messing around with the stuff from the tile based tutorials for that). Thing is, I'm new to this kind of thing and I'm stumped as to how to get the camera to lock on to the player character as it moves around the level (i want him center screen).
Do i somehow lock the camera view to the player's position as he moves around (which i have no idea how to do)? Or do i move the world around the player (seems a faff to me)? I'm struggling to figure out where to start on this... Can anyone suggests techniques, tutorials or generally give me a bit of a backrub and slice of tasty cake?
I'm planning to have decent sized levels and i'd like to have all the characters physics driven (enemies, player, spells he casts - is this an insane idea?)
Please excuse the absolute mess of commented out code in there and the general carcrash of code that it is - I've been struggling with the collision checking code, so for this, i cut it and everything to do with it, out
Cheers