max.alivin

Hello All,

I am using Spine-2D in conjunction with Phaser 3.19.0. The newest version of Phaser released with a fully functional Spine plugin, but I'm having trouble with one aspect of it. When the animation of my character runs in Phaser the skeleton acts as a bounding box causing the player to bunny hop which causes issues with collision.

Here is a gif of my current animation running in Spine.
characteranimation.gif


and here it is running in the game:
characteranimation[bug].gif


As the character moves forward it is physically lifted off the ground when the animation moves up. This causes the sprite to fall (evident by the green line which represents the sprite's velocity), thus creating the illusion of a bunny hop. I definitely don't want it to fall continuously like this though because the disconnection from the ground creates gaps in time when the player is allowed to jump.

Here is the game footage zoomed in and slowed down:
characteranimation[bug][zoom].gif


and again without the bounding box:
characteranimation[bug][clear].gif


If anybody has ideas on why this may be happening, I would greatly appreciate any suggestions on how to fix it.

Thank you!

edit: clarification

---

After searching for a while I found that the best solution is to put the SpineGameObject inside of a Container game object and to apply an arcade physics body to the container.
У вас нет необходимых прав для просмотра вложений в этом сообщении.
max.alivin
  • Сообщения: 2

badlogic

Sorry, we aren't maintaining the Phaser integration ourselves. The solution you have found would have been our general recommendation in this case though: create a collider separate from the Spine object.
Аватара пользователя
badlogic

Mario
  • Сообщения: 2127


Вернуться в Runtimes