love.physics suggestions! :D

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
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

love.physics suggestions! :D

Post 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).
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: love.physics suggestions! :D

Post 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
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: love.physics suggestions! :D

Post 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).
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: love.physics suggestions! :D

Post 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.
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: love.physics suggestions! :D

Post by Kaze »

Returning false on a collision callback should have the entities not collide, too.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: love.physics suggestions! :D

Post 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.
Ace (SWE)
Prole
Posts: 5
Joined: Tue Aug 26, 2008 7:38 am

Re: love.physics suggestions! :D

Post 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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 15 guests