Physic body scale issue? (DEF-521) (SOLVED)

The first, I’d like to thanks Defold team for a great Defold game engine.

I’m in progress of completing my wip game. There’s only issue with collision detect when game object is scaled at runtime.

The game heavily basing on scale and need to detect the collision between the scaling game object and a flying one. All are kinematic. The body shapes scales good when creating game object in editor and factory at runtime but it doesn’t scale with go.animate ( I guess go.set should get same issue).

Is there any workaround solution or fixing ? I have to do with pixel detect in my old game.

Regards,

2 Likes

This is a know issues that is discussed here: Scaling Collision Object when Game Object is scaled (DEF-521)

I’ll try to push for higher prio on this!

1 Like

Thanks for letting me know that. Look like pixel detect is probally a workaround for me while waiting for the fixing. I remember that delete/remove body at runtime for scale might have an impact on performance. If the sprite is added an offset to game object it requires more fixing. It should like a challenge.

Note that Box2D does not support scaling so this is potentially a big, cumbersome issue.

3 Likes

You would need to delete / create at new scale. This is the way scaling is done elsewhere with box2d afaik.

3 Likes

Agree, there’s a lot of game engine that don’t support physic body scale.

I’ve ever tried to create/remove game object to pass the issue but the game is low performance on old engine but it is a good point to try with Defold.

wow, when i first see this topic , i thought body scale is like body weight scale topic. I think i am wrong.

Solved in 1.2.170

2 Likes