Platypus player speed too fast using regular collision shapes

I’m using the Platypus library, which is amazing by the way and you’ve done an incredible job with it, but I’m having issues using it without tilemap collisions.

Whenever my player walks on an object using a collision component with a regular square shape, the player speed is way too fast. When instead using an object with a tilemap and a collision component connected to that tilemap, the speed is as expected.

Here’s the setup for the two cases described above:

Collision using square shape
image

Collision using tilemap. This works fine, just as the example provided with the lib.
image

I’ll attach a zip of my project here so you can have a look to help visualise the issue. It’s a bit difficult to explain.
Squirrel.zip (319.2 KB)

Is this library just only supposed to work using tilemap collisions, or am I simply doing something wrong? Thanks! I appreciate any help you can provide.

1 Like

It should work. I will take a look.

1 Like

Ah, this was tricky. The platform is a separate game object that you have scaled horizontally:

When a Platypus controlled player gets ground contact it will be parented to the object it lands on (to easily support moving platforms). In this case it also has the effect of increasing horizontal movement speed by 4. I think I’ll add a fix to compensate for this.

2 Likes

Oh I see! That’s good to hear though. I was going to add a sprite with the proper size to that object anyway, to not have to scale it. This was mostly just for testing purposes. I just tried setting the scale back to 1 and importing a bigger sprite instead, and it works wonderfully now.

Whether you add a fix for this or not, thank you so much for the assistance! As helpful as always. I’m having a really good time using Defold.

I tried a quickfix just now and it seems a little bit more complicated than I first thought. If you can stay away from different scales that would be best I think.

1 Like

You can quickly create a separate go with only collisionobject and its shapes (even all shapes on the level, if they aren’t moving). And then you can create another separate go with your sprite only (and scale it as you like) and adjust the positions of shapes and this sprite.

2 Likes

Ah, yes that if of course an option. Thank you for the suggestion :slight_smile:

1 Like