I’m trying to get a crouching system working,
Currently my player collision origin is at the center of the player.
When I replace the player collision mesh with a smaller Cube, the Cube appears at the center of the player (because of the player collision origin), whereas I want the Cube to appear at the bottom of the player (to act as feet collision while crouched).
Is there anyway to offset where objects are spawned (using python) ?
Changing the origin -> edit mode, ruins the collision bounds.
I’m using the instantReplaceMesh function:
crouch = cont.sensors['crouch'] #keypress
swap = cont.actuators['crouch'] #edit object
if crouch.positive:
swap.instantReplaceMesh("Crouch_Collide", True, True)
Thanks