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 eraserhd

I need different bounding boxes for different animation frames. Essentially, the character is double-high when standing compared to when jumping.

Also, static collisions with the world need to be adjusted (ideally). The character's feet are only a few pixels wide compared to the size of the bounding box. Non-foot collisions with ground should push the character left or right.

How can I do these things.

1 decade ago by dominic

You can dynamically change the .size properties of your entity. The Animation can be moved around relative to the bounding box with the .offset properties.

I don't understand what exactly you want to do with the character's feet.

If it helps: you don&039;t have to use the default collision box at all. If you overwrite the #.update() method of your entity, you can do the collision traces against the background map on your own, for any number and sizes of collision boxes. See the default .update() method in entity.js.
Page 1 of 1
« first « previous next › last »