Hi,
I'm working on my platformer game and I have started to re-work my player's hitbox. He currently has one box.
I want to re-work this with multiple hitboxes for different parts of the player. I want a box with high friction to simulate his feet and another box with no friction to be the actual body.
Such as:
+----------+ Main collision box with no friction (to prevent the player from getting stuck to walls)
|..........|
|..........|
+----------+ Feet hitbox with high friction.
|..........|
+----------+
My question is how do I treat these two bodies as the same when I want to apply forces etc? What I find about groups in the manual seems to apply for collision filtering only.
I tried welding one body to the other with a weld joint, but they don't seem to stick together the way I want during game play. The high friction box gets lagged behind and it's has a "bouncy" effect to the welding. If this is the way to go, where should the anchor best be placed?
Thanks
I'm working on my platformer game and I have started to re-work my player's hitbox. He currently has one box.
I want to re-work this with multiple hitboxes for different parts of the player. I want a box with high friction to simulate his feet and another box with no friction to be the actual body.
Such as:
+----------+ Main collision box with no friction (to prevent the player from getting stuck to walls)
|..........|
|..........|
+----------+ Feet hitbox with high friction.
|..........|
+----------+
My question is how do I treat these two bodies as the same when I want to apply forces etc? What I find about groups in the manual seems to apply for collision filtering only.
I tried welding one body to the other with a weld joint, but they don't seem to stick together the way I want during game play. The high friction box gets lagged behind and it's has a "bouncy" effect to the welding. If this is the way to go, where should the anchor best be placed?
Thanks