Gamebop / physics

Physics components for PlayCanvas
https://gamebop.github.io/docs/
3 stars 1 forks source link

Character step walking #77

Closed LeXXik closed 2 months ago

LeXXik commented 2 months ago

Adds a a feature to allow character controller to move on steps. All options are optional and can be changed after controller is created.

New API:

entity.addComponent('char', {
    ...,
    walkStairsStepUp: new pc.Vec3(0, 0.5, 0)
});
const char = entity.char;
char.bpFilterLayer;
char.objFilterLayer;
char.stickToFloorStepDown;
char.walkStairsCosAngleForwardContact;
char.walkStairsMinStepForward;
char.walkStairsStepDownExtra;
char.walkStairsStepForwardTest;
char.walkStairsStepUp;