Box2D implmentation

27 views
Skip to first unread message

Paul Cheetham

unread,
Jul 18, 2013, 3:52:09 PM7/18/13
to fantom...@googlegroups.com
Hi there, 
First, great engine, makes things so much easier!
Now, on to my question. Raycasting in fantom, is it possible or is there a way to use the existing box2d in monkey as well as the fantom implementation?

Basically I'm trying to find objects around a central object and apply a force to the points where the ray hits.

Any ideas?

Thanks.
Paul.

Michael Hartlef

unread,
Jul 18, 2013, 4:51:46 PM7/18/13
to fantom...@googlegroups.com
I didn't implement Raycasting into the module right now, but with lowlevel Box2D calls it is doable.

The Box2D implementation is just a wrapper to make things more easier for you. Will add Raycasting soon.

Paul Cheetham

unread,
Jul 18, 2013, 6:34:52 PM7/18/13
to fantom...@googlegroups.com
Thanks for the swift reply. I'm sure you have higher priorities than raycasting but thanks for thinking about it.

cheers,
Paul.

Michael Hartlef

unread,
Jul 19, 2013, 2:31:30 AM7/19/13
to fantom...@googlegroups.com
I will have a look today. If i can implement it fast, the you might get it tonight.

Paul Cheetham

unread,
Jul 19, 2013, 8:13:25 AM7/19/13
to fantom...@googlegroups.com
That would be great if you could. Spent some time last night trying to implement existing box2d with the fantom engine box2d. Have to say I struggled quite a bit and didn't really achieve a great deal. :-(

p.

Michael Hartlef

unread,
Jul 19, 2013, 4:57:37 PM7/19/13
to fantom...@googlegroups.com
Ok, it will take at least till tommorow. I have raycasting working but I want to give you also the response angle as a normal. Not only the normal of the face you hit. And that kind of math is a mistery for me at the moment.

Michael Hartlef

unread,
Jul 19, 2013, 6:20:30 PM7/19/13
to fantom...@googlegroups.com
Ok, got it. Now let me sleep a night over it. I need to wrap this nicely and then I can post an updated Box2D wrapper plus and example.
I have a lot of private stuff going tomorrow so It will be in around 24 hours too.

Paul Cheetham

unread,
Jul 19, 2013, 6:39:27 PM7/19/13
to fantom...@googlegroups.com
Hey, the fact that you have made time to do this is great.
Take all the time you need, it is very appreciated.
Oh, and the math, normals and such like. I'm not sure where I would start with that. Luckily there are people like you out there willing to give us folk a helping hand!!

p.

Michael Hartlef

unread,
Aug 18, 2013, 8:49:21 AM8/18/13
to fantom...@googlegroups.com
Sorry Paul that it took so long, but I have now finally uploaded 1.52 which supports easy raycasting.
Reply all
Reply to author
Forward
0 new messages