Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Aristy

Hi,

I'm new to ImpactJS and I have a problem like this:
http://i.imgur.com/dTxJIN7.jpg

Basically, player collides with signboard, although it shouldn't be.

I believe Impact doesn't support 2.5D yet, so how can I hack my way through by adding collisions to the foot of my player?

Instead of this;

size = { x: 80, y: 40 }

I need something like this;

size = { x: 60-80, y: 35-40 }

so collisions will be added to his feet.

How can I solve this? I believe there are other ways too. :)

1 decade ago by dominic

The collision box is independent of the sprite's graphic size. In your case, it should only be as big as the player's feet, not as big as the sprite graphic itself.

So what you want is actually size = { x: 20, y: 5 }. You can then use the Entity&039;s #.offset property to position the sprite relative to the collision box.
Page 1 of 1
« first « previous next › last »