I’m using the FPSWalkerEnhanced script which is working great! After asking on the forums, I’ve modified the script to account for camera rotation, so that “forward” is always away from the camera, etc. However, when I walk backwards (towards the camera), my character floats upwards towards the camera - obviously something to do with me using the camera vectors, but I’m not sure how to fix the behavior!
// Otherwise recalculate moveDirection directly from axes, adding a bit of -y to avoid bumping down inclines
else {
moveDirection = inputX * inputModifyFactor * speed * Camera.mainCamera.transform.right;
moveDirection += inputY * inputModifyFactor * speed * Camera.mainCamera.transform.forward;
moveDirection = myTransform.TransformDirection(moveDirection) * speed;
playerControl = true;
}
Any ideas or input are greatly appreciated! I’m also trying to get the character to rotate based on the move direction, if anyone is able to give advice on incorporating that into this script, I’d be thankful - if not, I can always ask in a new post once I fix this bug ![]()