Hi!
I have a hero that is shaped like a ballon (a ball-shaped top and a smaller basket in the bottom). The hero moves up by touching the device due to ‘hero.vy = -0.8’ and moves down by gravity.
If I just give the hero physics without any parameters (=rectangle shape) the ballon moves up and down like I want it. But if I give the hero a balloon shape, the hero starts rotating when I touch the screen, which I don’t want.
So, in other words:
-- 1. My hero moves up and down without rotating, but with a bad shape:
physics.addBody(hero)
-- 2. My hero has the perfect shape, but starts rotating when moved up and down.
pentagonShape = { 16.1458320617676, -0.124998092651367 , 3.95833206176758, 25.2916666716337 , -2.50000095367432, 26.2291666269302 , -16.9791666865349, -4.08333206176758 , -15.4166667461395, -15.6458320617676 , -7.70833396911621, -24.4999961853027 , 5.625, -25.2291641235352 , 18.0208320617676, -14.5 }
physics.addBody(copter, {shape=pentagonShape})
How can I combine these two so I get my wanted result?
Best regards,
joelwe [import]uid: 54640 topic_id: 9793 reply_id: 309793[/import]

[import]uid: 54640 topic_id: 9793 reply_id: 35708[/import]