Collision shapes moves

#1

Hi! I am doing a game where you can jump around in a world and look out for monsters and when i scaled up the level and added boxes they suddenly did not follow.
Image of level:


Image of build(with physics debug on):

Is this a bug or have i done something wrong?

0 Likes

#2

I believe collision objects only scale correctly if the scaling is uniform - make sure you use the same scale for the Z axis as well.

0 Likes

#3

Hmmm… Either i did not understand the answer but the effect gets to

0 Likes

#4

Do you have physics set to 3D? I know that collision shapes and scales are a tough topic for Defold.

0 Likes

#5

Let me check… No… They are in 2D

0 Likes

#6

Do you have multiple collision shapes of different types on the same object?

0 Likes

#7

Maybe it has something to do with the scaling… I think collision shapes don’t scale in Defold just yet.

1 Like

#8

No, i don’t. I only use squares. Well… the info is that the GO called level is scaled to 3 times bigger and I use about 12 boxes for the level

0 Likes

#9

Do you scale the object at runtime?
We currently don’t support physics scaling that way. Only at editor time or via the factory create functions.

0 Likes

#10

I scale the level in editor, i think, i don’t have any scripts running at least.

1 Like

#11

Hmm, could be it. I guess so at least. But, the shapes scale, they are just in the position like if they was in scale 1 instead of 3 @Edd

0 Likes