Search found 60 matches
- Tue Jan 08, 2013 10:03 pm
- Forum: Support and Development
- Topic: rotate an image in the direction of the mouse
- Replies: 11
- Views: 9142
Re: rotate an image in the direction of the mouse
A little trigonometry should do the trick. You have a triangle like this, where B is the barrel and M is the position of your mouse cursor. http://ronkes.nl/images/trigonometry.png You know the coordinates of both B and M, so you can calculate two of the sides of the triangle: M.x - B.x and M.y - B...
- Tue Jan 08, 2013 4:46 am
- Forum: Support and Development
- Topic: rotate an image in the direction of the mouse
- Replies: 11
- Views: 9142
rotate an image in the direction of the mouse
hi how I can make the red barrel follow the mouse or look
- Sat Dec 22, 2012 9:40 am
- Forum: Support and Development
- Topic: help with this file
- Replies: 8
- Views: 9384
Re: help with this file
Hello I still have the problem of the collision with the ground here I leave the file with the problem but a picture of what I mean. So, now you added floating platforms and notice that your previous code made for floor don't work now. Well but is no use do another "let's make a platform game&...
- Fri Dec 21, 2012 7:33 pm
- Forum: Support and Development
- Topic: help with this file
- Replies: 8
- Views: 9384
Re: help with this file
Thanks but I still have the problem of the clash. What do you advise me? There isn't much to say from my first post than give you some code. Something simple as this work. Code and measures taken from "Collicion con las paredes x, y" section. I didn't check if your "width + width&quo...
- Fri Dec 21, 2012 2:50 pm
- Forum: Support and Development
- Topic: help with this file
- Replies: 8
- Views: 9384
Re: help with this file
First an advice. Your cube starts game in plain air and due to machine performance oddities you dt could be affected when you land. That way there lot of chances that your player "tunneling" the ground. Half of times I start your game it fails. You can fix this putting in your love.update...
- Fri Dec 21, 2012 1:08 pm
- Forum: Support and Development
- Topic: help with this file
- Replies: 8
- Views: 9384
Re: help with this file
First an advice. Your cube starts game in plain air and due to machine performance oddities you dt could be affected when you land. That way there lot of chances that your player "tunneling" the ground. Half of times I start your game it fails. You can fix this putting in your love.update...
- Fri Dec 21, 2012 3:01 am
- Forum: Support and Development
- Topic: help with this file
- Replies: 8
- Views: 9384
help with this file
Hi I have the following file mi juego 02.love that when you jump and hit the tilemap throws the following error: Error: main.lua:160: attempt to index field '?' (a nil value) stack traceback: main.lua:160: in function 'IsCollider' main.lua:136: in function 'update' [string "boot.lua"]:407:...
- Wed Nov 28, 2012 12:47 pm
- Forum: Support and Development
- Topic: help collision of TileMap en love2d
- Replies: 4
- Views: 3772
Re: help collision of TileMap en love2d
You were only checking collisions with the ceiling and floor of the map. I added a few lines of code to your isOffMap() function to show you how to detect a collision with the center of your helicopter and any solid tile. Basically what I did was: Check which map cell the player's central point was...
- Sun Nov 25, 2012 5:58 pm
- Forum: Support and Development
- Topic: help collision of TileMap en love2d
- Replies: 4
- Views: 3772
Re: help collision of TileMap en love2d
kesac wrote:Can you post a .love file that includes your "camara" script and assets? Would be easier to debug this way...
ok here I leave the. love
File love
http://www.mediafire.com/download.php?jom8elnv947bvkm
- Sat Nov 24, 2012 3:23 pm
- Forum: Support and Development
- Topic: help collision of TileMap en love2d
- Replies: 4
- Views: 3772
help collision of TileMap en love2d
Hi I need help with collisions of TileMap require('Script/camara') function love.load() CELLSIZE=32 createMap() text = "Estado: " Score = "0" FontSize = love.graphics.newFont(20) love.graphics.setFont(FontSize) image = love.graphics.newImage("personaje/elicopter.png") w...