Exploring the Box2d World

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
paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Exploring the Box2d World

Post by paclito » Mon Sep 07, 2009 10:28 pm

I'm reading the documentation of box2d library at
http://www.box2d.org/manual.html#d0e544

and have see some very interesting functions to know what is in the world and what is at a rectangle in the world, the functions are
GetBodyList()
for a list of bodies in the world and

AABB Queries
for queries to the world, the result is a sort of list of bodies in the rectangle

I've not see this in our love library.....or i'm mistaked?

there is some function to do it? ...I have'nt see at docs sorry :-)

User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Exploring the Box2d World

Post by napco » Mon Sep 07, 2009 11:34 pm

Uhm... I think this is the wrong section, but you can search and download "wrath" or "envy" in the Project and Demos section. (It's a game powered by Box2D)

User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Exploring the Box2d World

Post by osgeld » Tue Sep 08, 2009 2:31 am

my mistake

paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: Exploring the Box2d World

Post by paclito » Tue Sep 08, 2009 5:35 am

Sorry, it's true, this message was for the developement board........One administrator can change please?

Envy is a framework for make my life easy but has'nt these functions i think

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Exploring the Box2d World

Post by Robin » Tue Sep 08, 2009 5:47 am

At least GetBodyList() is easy to implement if you just keep a table around where you store all bodies:

Code: Select all

bodylist = {}
table.insert(bodylist, love.physics.newBody(...)
etc.
Help us help you: attach a .love.

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Exploring the Box2d World

Post by rude » Thu Sep 10, 2009 6:57 pm

Moved!

paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: Exploring the Box2d World

Post by paclito » Fri Sep 11, 2009 10:29 pm

thanks for responses.... but ... yes and not, when programming object oriented this is not possible to do that and i've see a site for raytracing (what is the next intersection with a phisical object when tracing a line from point to point)

i've this site to start learning
http://www.ogre3d.org/wiki/index.php/Ra ... ygon_level

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests