README.md
January 21, 2024 ยท View on GitHub
3D FPS Movement
Description
This is a simple 3D movement system for Unity using mouse input for rotation and keyboard input for movement, jumping, and dashing.
Features
- Mouse-controlled rotation using the
Mouse XandMouse Yaxes - Keyboard-controlled movement using the
HorizontalandVerticalaxes - Jumping with the
Spacekey - Dashing with the
Left Shiftkey - Adjusting player height with the
Left Controlkey (for crouching)
Instructions
- Attach the
MouseRotationscript to the player's GameObject. - Attach the
Movescript to the player's GameObject. - Create a Collider and a Rigidbody components for the player's GameObject.
- Assign the Collider and the Rigidbody components in the
Movescript. - Create a GameObject with a tag of "Ground" to represent the ground surface.
Controls
- A and D keys:
Horizontal Axis - W and S keys:
Vertical Axis - Jump:
Spacekey - Dash:
Left Shiftkey - Crouch:
Left Controlkey
Known Issues
- Dashing may cause the player to slide along the ground.
TODO
- Improve collision detection for dashing.
- Add more advanced movement mechanics, such as wall jumping and sliding.