Hittest

36 views
Skip to first unread message

Emmanuel Bourmault

unread,
Aug 9, 2012, 1:26:07 AM8/9/12
to dartga...@googlegroups.com
Hi everybody,

I'm trying to do a hittest with box2d, is there a way to do it ? Or do I need to do all by myself ?
I saw this piece of code for another language :

b2Fixture* fixture = body->CreateFixture(&fixtureDef);//hold the fixture reference somewhere accessible by the line below


if (fixture->TestPoint(b2Vec2(x,y))){ 
//provide the coordinate of the world

//your statements here..

}

Reply all
Reply to author
Forward
0 new messages