Page 1 of 1

love.physics suggestions! :D

Posted: Mon Sep 08, 2008 10:36 am
by Kuromeku
  • There is isFrozen, isStatic and isDynamic but no way to set them.
  • Could you add a way to get all bodies in the world as an array? I know you have a way to get the number of bodies but a way to get all bodies as a table would be awesomesauce.
  • Prismatic Joints, Gear Joints, Pully Joints?
  • Like you said in a previous post, some sort of "traces" would be great. Basically checking if a line hits a body, then it returns the body (and World).

Re: love.physics suggestions! :D

Posted: Mon Sep 08, 2008 9:21 pm
by Kaze
Kudomiku wrote:Like you said in a previous post, some sort of "traces" would be great. Basically checking if a line hits a body, then it returns the body (and World).
Just the body?
It should return (a table of):
  • Body hit
  • Shape on said body
  • Position at which the line hits
  • Direction perpendicular to the surface hit

Re: love.physics suggestions! :D

Posted: Tue Sep 09, 2008 11:17 pm
by rude
Great initiative, Kudomiku.
  • setFrozen etc. does not exist.
  • With some hacking it would be possible to get all the bodies as a table, but I can't see why this is needed. Bodies should be stored in the Lua game code.
  • Prismatic joint already exists, the others will be added eventually.
  • Traces could be useful, though the function would return a table of shapes, not bodies.
These kinds of requests were just what I hoped for, so keep it up (but don't overdo it :D).

Re: love.physics suggestions! :D

Posted: Wed Sep 10, 2008 4:25 pm
by Kuromeku
Thanks Rude, if it's not too much to ask could you add a way to make two entities not collide in the next release?

body:setNoCollide(otherBody);

Thanks.

Re: love.physics suggestions! :D

Posted: Wed Sep 10, 2008 5:03 pm
by Kaze
Returning false on a collision callback should have the entities not collide, too.

Re: love.physics suggestions! :D

Posted: Thu Sep 11, 2008 9:56 pm
by rude
Note: bodies do not collide, shapes do.
Kudomiku wrote:Thanks Rude, if it's not too much to ask could you add a way to make two entities not collide in the next release?

body:setNoCollide(otherBody);

Thanks.
Have you looked at shape:setCategory and shape:setMask?
Kaze wrote:Returning false on a collision callback should have the entities not collide, too.
Checked Box2D docs, it's possible, but needs separate callback.

Re: love.physics suggestions! :D

Posted: Wed Sep 17, 2008 6:06 am
by Ace (SWE)
A nice effective way to remove bodies would be nicey nicey. My current method is to move the object outside the world and remove it from the render que.