I was playing around a while ago with physics and accelerometer and wanted to make an object jump when “touch ended”. While doing this I tried two ways to accomplish this, first was to apply linearImpulse and second was to move object X pixels in the Y direction.
What way is the best to do this?
One thing I noticed is that I could make the object jump in mid air before it had landed on “ground”, which i didn’t really want it to be able to do. I guess now when I think about it I could have added some sort of collision detection when the object had landed so it could not jump before that collision had been detected?
Can anyone give me some feedback and/or some samples?
Sorry for not providing any code, I can’t write this from the top of my head but I can post some later when I have read a little more.
Thanks.
David [import]uid: 34126 topic_id: 9889 reply_id: 309889[/import]