Collision? How?!
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Collision? How?!
Hey Guys im new at Love and i wanna make a Game but now; How Can i make a Collision between a Rectangle and the Player? So that the Player can't go over the Rectangle?
Re: Collision? How?!
to do this, you need to check if the objects overlap, or will overlap. how much of the code have you got so far? do you have the players movement sorted out?
Re: Collision? How?!
[url]htttp://love2d.org/wiki/Tutorial:Gridlocked_Player#Adding_collision[/url]
Your screen is very zoomed in...
Re: Collision? How?!
This is to Complicated :/ Can i Give You the Source Code and you add this for me pls? ![Sad :(](./images/smilies/ms-sad.png)
![Sad :(](./images/smilies/ms-sad.png)
Re: Collision? How?!
Are you familiar with the basics of programming/lua?
If not, just check out some tutorials and get familiarer. Then Löve2D is much easier to learn and use.
http://www.lua.org/manual/5.1/
http://lua.lickert.net/index_en.html
http://www.youtube.com/user/DevHQLesson ... ?query=lua
http://lua.gts-stolberg.de/en/index.php
Otherwise:
https://love2d.org/wiki/BoundingBox.lua
It is also complicated, I warned you.![Glee ^^](./images/smilies/ms-glee.png)
Edit: Oh, and we have the sourcecode already...![Wink ;)](./images/smilies/ms-wink.png)
If not, just check out some tutorials and get familiarer. Then Löve2D is much easier to learn and use.
http://www.lua.org/manual/5.1/
http://lua.lickert.net/index_en.html
http://www.youtube.com/user/DevHQLesson ... ?query=lua
http://lua.gts-stolberg.de/en/index.php
Otherwise:
https://love2d.org/wiki/BoundingBox.lua
It is also complicated, I warned you.
![Glee ^^](./images/smilies/ms-glee.png)
Edit: Oh, and we have the sourcecode already...
![Wink ;)](./images/smilies/ms-wink.png)
"Docendo discimus" - Lucius Annaeus Seneca
Re: Collision? How?!
._. Why i can't understand Lua/Love2D ?
Re: Collision? How?!
Study and try all. Spend time. That's it.
... I added a new rectangle. If you collide with it, a message appear. This should explain how basic collision works.
All code is commented, I hope it helps.![Smile :)](./images/smilies/ms-smile.png)
... I added a new rectangle. If you collide with it, a message appear. This should explain how basic collision works.
All code is commented, I hope it helps.
![Smile :)](./images/smilies/ms-smile.png)
- Attachments
-
Test.love
- Basic collision example
- (1.98 KiB) Downloaded 124 times
"Docendo discimus" - Lucius Annaeus Seneca
Re: Collision? How?!
How can i see the code?
Re: Collision? How?!
Rename the "Test.love" into "Test.zip", open it with a zip-programm of your choice like WinRar, WinZip or 7-Zip and open "main.lua".
"Docendo discimus" - Lucius Annaeus Seneca
Who is online
Users browsing this forum: No registered users and 1 guest