gravity control

My question. I do not want the object to be dropped/released until the player determines where it will drop. Currently with my code, the ball drops immediately without players choice of dropping position. Not good.

essentially I want the ball, to be held at the top until the player chooses to let it release. ANy clues would be greatly appreciated.

Something,
onLoad
ball remain in Y position (top of screen) then wehn tapped, ball drops, using gravity as its drive. I suppose, now that I think about it, I could not use gravity, and just use someting would simply fire it.

You could create a joint to hold it in place, and remove the joint to let go. Even simpler is to not add the body or collision shape to the space until you want it to fall, but then it won't interact with other objects while it sits there.

Skorche Wrote:You could create a joint to hold it in place, and remove the joint to let go. Even simpler is to not add the body or collision shape to the space until you want it to fall, but then it won't interact with other objects while it sits there.

so in theory tho, the ball will be held by a "hero",so that "hero"object, with slide controls could be "the joint"/ and object which will, when triggered also be the delegate to get the ball and release it?

Or should the hero object hold the ball inside it?

Minimal memory either way I imagine. But I think the Ball should be a separate class seeing as it has to have full gravity and physics applied to it.