-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
29 lines (27 loc) · 966 Bytes
/
README
File metadata and controls
29 lines (27 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Bevy First Person Shooter Controller
This plugin is a blatant copy of the character controller example in the bevy_rapire3d examples repo. You can find this example here: [(github.com)](https://github.com/dimforge/bevy_rapier/blob/master/bevy_rapier3d/examples/character_controller3.rs)
This repo turns the basic example into a simple to use plugin. you just need to do the following setup:
```
App.new()
//add rapier boilerplate
.add_plugins(RapierPhysicsPlugin::<NoUserData>::default())
.add_plugins(RapierDebugRenderPlugin::default())
//add our plugin
.add_plugins(FpsPlugin::default())
```
To edit the setting of the fps plugin we use the FpsSettings Object
```
let fps_settings = bevy_fps::FpsSettings{
gravity: -9.81,
ground_timer: 0.5,
jump_speed: 8.0,
mouse_sensitivity: 0.3,
movement_speed: 8.0,
transform: Transform::from_xyz(0.0, 10.0, 0.0)
}
App::new()
.add_plugins(FpsPlugin{
settings: fps_settings
})
...
```