I can't figure out How to integrate gravity with corona and the whole skeleton on spine,
I got the physics and collision following this post http://esotericsoftware.com/forum/viewtopic.php?f=7&t=1855&p=9125&hilit=+bounding+corona#p9125
So I think I can find an issue with no gravity by moving the root bone on collision, it's what i'm trying to do at the moment but that's a bit weird how the animation run. I also try to break down the animation in 3 parts but same things
I've also tried to put gravity there (see code below) and put every images on a table to reach'em later and put'em together to have just one bodies moving but when I check what is in the Table with the print I got more than one copie for each images,
And when I use "dynamic" mode, gravity works but all images don't stay together, could say it's normal :doh:
function Player:createImage (attachment)
PlayerBox = display.newImage("spine-animation/Kangaroo/images/" .. attachment.name .. ".png")
PlayerBox.name = "PlayerBox : " .. attachment.name
physics.addBody(PlayerBox, "kinematic",{friction=0.2 , density=5, bounce=0})
PlayerBox.gravityScale = 5
AllPlayer[#AllPlayer+1]=PlayerBox
for x = 1, #AllPlayer do
print(AllPlayer[x].name)
end
---
]]
return PlayerBox
end
I tried lot of other stuff but I'm newbie and can't get properly what I want, I need my player jump from the ground to different platform at differents height.
Any Idea ?
OK found it !
I attached the skeleton to à dynamic object.
it was my mistake if it did not work :drunk: