Hi,
I am a newbie to Box2D and thought this must be a very basic question, but couldn't manage to find an answer.
I am developing a game and there's some situation that I need to place an object to a specific position right away with mouse or programmatically.
I know there's MouseJoint and SetTransform.
But, the thing is,
1. with MouseJoint, there's always little bit of friction and damping so it's hard to place an object to the "exact position" at the "exact time".
Is there a specific setting I should make with MouseJoint to achieve this?
2. with SetTransform(), the object I'm trying to move is connected to other objects through b2DistanceJoint and I still want the joint to work (affecting connected objects' position) while I'm moving the object, which is not the case with SetTransform().
What would be the way to move objects for me?
thanks a lot in advance.
🙂
I am a newbie to Box2D and thought this must be a very basic question, but couldn't manage to find an answer.
I am developing a game and there's some situation that I need to place an object to a specific position right away with mouse or programmatically.
I know there's MouseJoint and SetTransform.
But, the thing is,
1. with MouseJoint, there's always little bit of friction and damping so it's hard to place an object to the "exact position" at the "exact time".
Is there a specific setting I should make with MouseJoint to achieve this?
2. with SetTransform(), the object I'm trying to move is connected to other objects through b2DistanceJoint and I still want the joint to work (affecting connected objects' position) while I'm moving the object, which is not the case with SetTransform().
What would be the way to move objects for me?
thanks a lot in advance.
🙂