Is there an easy way to make collision?
I really would like to find an easy collision method that works well and is compatible with Bartbes Class.lua...
Collision
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- master both
- Party member
- Posts: 262
- Joined: Tue Nov 08, 2011 12:39 am
- Location: Chile
Re: Collision
if you have problems with hardon collider or you want a more basic collision system, i recomend you to use this simple function from the wiki :https://love2d.org/wiki/BoundingBox.lua
Re: Collision
Please try doing a forum search. There's a lot of content related to that.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
-
- Prole
- Posts: 5
- Joined: Thu Sep 20, 2012 11:57 pm
Re: Collision
Thanks, but can I please see an example in a .love or folder format? (using class.lua)master both wrote:if you have problems with hardon collider or you want a more basic collision system, i recomend you to use this simple function from the wiki :https://love2d.org/wiki/BoundingBox.lua
That would be so incredibly helpful!
I did. I am pretty new to forum searches, so I couldn't really find what I was looking for easily.Lafolie wrote:Please try doing a forum search. There's a lot of content related to that.
If you find something covering what I ask, by all means, I would LÖVE to know.
Re: Collision
Why not just make your own (simple) lib?
it isn't to hard to make a collision function for rectangles colliding with rectangles, or circles colliding with circles. Plus, if you make your own, you will totally understand it, and the theory behind it.
if you really want to use a pre-made lib, most of them come with demos, but I still suggest that you start by trying to make your own, even if you do end up using a lib later, it will help you understand whatever lib you are using a lot!
Good luck!
it isn't to hard to make a collision function for rectangles colliding with rectangles, or circles colliding with circles. Plus, if you make your own, you will totally understand it, and the theory behind it.
if you really want to use a pre-made lib, most of them come with demos, but I still suggest that you start by trying to make your own, even if you do end up using a lib later, it will help you understand whatever lib you are using a lot!
Good luck!
- master both
- Party member
- Posts: 262
- Joined: Tue Nov 08, 2011 12:39 am
- Location: Chile
Re: Collision
Here is a very simple example, is a box falling.
So, basicly, what the function do is to detect if the box is touching the floor.
also, i dont know how to use "class.lua"
btw are you from the mari0 forums?
So, basicly, what the function do is to detect if the box is touching the floor.
also, i dont know how to use "class.lua"
btw are you from the mari0 forums?
- Attachments
-
- example.love
- (482 Bytes) Downloaded 141 times
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Collision
Seems to be working properly.master both wrote:Here is a very simple example, is a box falling.
So, basicly, what the function do is to detect if the box is touching the floor.
What's class.lua ?master both wrote: also, i dont know how to use "class.lua"
If you're looking how to create classes, you can have a look here, there's some explanations.
You also have lots of advanced libs for OOP: MiddleClass, 32log, 30log, SECS, and a lot more, just search.
Hope this helps.
- master both
- Party member
- Posts: 262
- Joined: Tue Nov 08, 2011 12:39 am
- Location: Chile
Re: Collision
I have never used classes in lua, but i think that BobTheLawyer was talking about the class.lua used in Mari0.Roland_Yonaba wrote: What's class.lua ?
If you're looking how to create classes, you can have a look here, there's some explanations.
You also have lots of advanced libs for OOP: MiddleClass, 32log, 30log, SECS, and a lot more, just search.
Hope this helps.
EDIT: lol, i recently dicover that is the SECS system
- Attachments
-
- class.lua
- This one, but have no idea what it is.
- (1.38 KiB) Downloaded 142 times
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 5 guests