Moving SegmentShape
Posted: Tue Jul 30, 2013 2:31 am
Hello,
I'm using Chipmunk-js for my game to be compatible with all devices.
I'm trying to move a sensor SegmentShape to detect collisions with it and act upon them, here's what im doing :
This is working for html5 but when i run it on iOS it stops working (the shape gets initialised but cannot be moved afterwards). Whats the way around this to make it compatible with iOS ? 
I'm using Chipmunk-js for my game to be compatible with all devices.
I'm trying to move a sensor SegmentShape to detect collisions with it and act upon them, here's what im doing :
Code: Select all
//Initialisation
vortex.shape = new cp.SegmentShape( game.space.staticBody, game.player.getPosition(), pos,30);
//Move endpoints
vortex.shape.b=pos;
vortex.shape.n = cp.v.perp(cp.v.normalize(cp.v.sub(vortex.shape.b, game.player.getPosition())));
