Hello is there way to detect that point with coordinates (x,y) inside a body?
I'm using chipmunk with cocos2d js
point detect in body
-
- Posts: 145
- Joined: Tue Mar 04, 2008 2:21 am
- Contact:
Re: point detect in body
Look on Demo file:
ChipmunkDemo.c =>
I belive it is this one:
ChipmunkDemo.c =>
Code: Select all
static void
Tick(double dt)
Code: Select all
static void
Click(int button, int state)
Code: Select all
cpVect new_point = cpvlerp(mouse_body->p, ChipmunkDemoMouse, 0.25f);
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
-
- Posts: 3
- Joined: Sat Jan 10, 2015 6:28 am
- Contact:
Re: point detect in body
ty for help but i found a solution in using "space.nearestPointQueryNearest" method.
but now i have another problem, how can i find distance between 2 shapes?
but now i have another problem, how can i find distance between 2 shapes?
Who is online
Users browsing this forum: No registered users and 11 guests