Change README to match the latest code
This commit is contained in:
25
README.md
25
README.md
@ -28,27 +28,20 @@ If you make a cool game with this addon, I would love to hear about it!
|
||||
You can make this a super basic controller by just disabling everything.
|
||||
|
||||
**How to add controller/GamePad support**
|
||||
In the controls export group, there is a commented section at the end that says "Uncomment this if you want full controller support". Uncomment that block.
|
||||
|
||||
Make a key map for each direction (left, right, up, down) and map them to your joystick.
|
||||
|
||||
Write in these keymaps in the controls section of the player settings.
|
||||
|
||||
In the `_process` function, there is another block of commented code at the end that says the same thing. Uncomment that too.
|
||||
|
||||
You should now be able to look around with the joystick. Make sure you add the other controls to the input map. (movement, jumping, crouching, sprinting, etc.)
|
||||
- In the controls export group, there is a commented section at the end that says "Uncomment this if you want full controller support". Uncomment that block.
|
||||
- Make a key map for each direction (left, right, up, down) and map them to your joystick.
|
||||
- Write in these keymaps in the controls section of the player settings.
|
||||
- In the `_process` function, there is another block of commented code at the end that says the same thing. Uncomment that too.
|
||||
- You should now be able to look around with the joystick. Make sure you add the other controls to the input map. (movement, jumping, crouching, sprinting, etc.)
|
||||
|
||||
**How to change settings:**
|
||||
Click on the character node and there should be settings in the "Feature Settings" group.
|
||||
|
||||
**How to add animations for a mesh:**
|
||||
In the `_physics_process` function, add a line to check whether you are walking or aren't walking. You can do this by checking whether `input_dir` is true or false. Optionally, set the animation speed to `speed / base_speed`. This will make it so when the player is walking, your animation speed is 1. If the player is sprinting, your animation goes up and if the player is crouching your animation speed goes down.
|
||||
|
||||
In the `toggle_sprint` function, add a line at the end where if `is_sprinting` is true, your animation is set to sprint.
|
||||
|
||||
In the `toggle_crouch` function, add a line where if `is_crouching` is true, your animation is set to crouch.
|
||||
|
||||
To check if the player is in the air, add a line in the `_physics_process` function where it says `if not is_on_floor():`set your animation to falling/in the air. Add an else statement to change it to the normal state.
|
||||
- Create a function for your animation and attach it to `_physics_process` to call it every frame.
|
||||
- Use `input_dir` as a boolean (it is actually a `Vector2`) to know if the player is walking.
|
||||
- Use the `state` member variable to tell if the player is sprinting or crouching
|
||||
- Use the `is_on_floor` function to tell if the player is standing or falling.
|
||||
|
||||
**How to change reticles (crosshairs):**
|
||||
- Find the folder at `res://addons/fpc/reticles`
|
||||
|
Reference in New Issue
Block a user