How to stick to a surface without physics and, rotate screen

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
MrMonacle
Prole
Posts: 8
Joined: Mon Jan 21, 2013 11:57 pm

How to stick to a surface without physics and, rotate screen

Post by MrMonacle »

Hey love community, I have just started to work on a game and I have a concept but I don't really know how to implement it. I looked at the gridlocked player tutorial and that got me started but I want to add more. 1, I want to always have the player stuck to the cubes on the map and, possibly only stay on the bottom half of the map. I also want to try to make it so that when you press space bar, it rotates the screen and changes the player so that they are stuck to the bottom of the screen. If anyone could help, that would be amazing!
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: How to stick to a surface without physics and, rotate sc

Post by micha »

MrMonacle wrote:I want to always have the player stuck to the cubes on the map and, possibly only stay on the bottom half of the map. I also want to try to make it so that when you press space bar, it rotates the screen and changes the player so that they are stuck to the bottom of the screen. If anyone could help, that would be amazing!
Do you mean by this, that you want to have gravity? Or at least something like gravity?

If you want the player to be on the ground all the time, you can implement this with a loop. Starting from the player position you examine the tiles downwards until you find the first cube. Then you position the player on the position above.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests