hi,
I am not to box2d but I am attempting to make a world that supports a specific type of user interaction.
A user can click on and move around any dynamic object. When doing so the dynamic object should not have an impact on other objects in the world. I do this by making it a sensor at that time. I then transform to body to the location of the user's touch. However the body still falls with gravity. So I then made the body static.
When the user releases the body it should re-appear in the physics world without any forces active on it.
so
touch starts
make a sensor
make static
move to touch position throughout the drag
on release
no longer a sensor
make dynamic
This does almost everything I want. With the exception that while I drag the body across the screen I want to know what it collides with. Being that my body is now a static sensor this works fine with the exception of it does not detect contact with other static bodies. And I need it to detect contact with static bodies.
Is there a way to make the contact listener fire for the contact of two static bodies or is there another way to get this interaction?
thanks
I am not to box2d but I am attempting to make a world that supports a specific type of user interaction.
A user can click on and move around any dynamic object. When doing so the dynamic object should not have an impact on other objects in the world. I do this by making it a sensor at that time. I then transform to body to the location of the user's touch. However the body still falls with gravity. So I then made the body static.
When the user releases the body it should re-appear in the physics world without any forces active on it.
so
touch starts
make a sensor
make static
move to touch position throughout the drag
on release
no longer a sensor
make dynamic
This does almost everything I want. With the exception that while I drag the body across the screen I want to know what it collides with. Being that my body is now a static sensor this works fine with the exception of it does not detect contact with other static bodies. And I need it to detect contact with static bodies.
Is there a way to make the contact listener fire for the contact of two static bodies or is there another way to get this interaction?
thanks