Hello
,
While trying to implement a character controller based on movewithCollisions I’m having troubles having my controlled mesh properly moving up and down, along the scene’s Y axis.
I have no trouble (so far) translating the mesh within the horizontal plane or rotating it around its Y axis. Hence the provided example Babylon.js Playground only deals with translating the mesh vertically (My purpose is to eventually implement some ‘jump action’ without relying on plugins and impostors, but found out I couldn’t even implement a basic vertical translation yet ).
The mesh is expected to move up when ‘q’ is pressed and down when ‘a’ is pressed. However:
- At first both keys result in an upward movement when pressed. (
)
- At some point going up the position increment seem to increase drastically compared to the first few key presses. (
- maybe I’m mutating the ‘up vector’ but my modest investigations suggest otherwise, logging said ‘up vector’ over time, using Vector3.Up() or brand new Vector3 instances instead…)
- Once ‘up enough’ I’m able to move the mesh down although it stops way before actually colliding with the ground (about half my box’s size it seems) for no apparent reason as far as I can tell. (
)
I’m pretty sure I had obtained the expected behaviour rather trivially through previous experiments so I’m probably missing something very obvious (though not to me at the moment ) here.
Thanks in advance for reading this
Best regards ,