need help in using mouseJoint:setTarget and physics gravity
Posted: Thu Feb 12, 2009 8:55 pm
if I set gravity and mouseJoint:setTarget for body at one time it doesn't work together.
for example I set
then mouseJoint system is working, gravity - not.
if I set
gravity is working, no mouseJoint
for example I set
Code: Select all
pl.body = love.physics.newBody(world, pos_x, pos_y)
love.physics.newCircleShape(pl.body, 28)
pl.body:setMassFromShapes()
pl.mouseJoint = love.physics.newMouseJoint(pl.body, pos_x, pos_y)
...
self.mouseJoint:setTarget(x_, y_)
if I set
Code: Select all
pl.body = love.physics.newBody(world, pos_x, pos_y)
love.physics.newCircleShape(pl.body, 28)
pl.mouseJoint = love.physics.newMouseJoint(pl.body, pos_x, pos_y)
pl.body:setMassFromShapes()
...
self.mouseJoint:setTarget(x_, y_)