FirstPersonController
</> ursina.prefabs.first_person_controller
Inherits Entity
Initialization
FirstPersonController(height=2)
Attributes
.cursor
default: Entity(parent=camera.ui, model='quad', color=color...
.speed
default: 5
.camera_pivot
default: Entity(parent=self, y=self.height)
.mouse_sensitivity
default: Vec2(40, 40)
.gravity
default: 1
.grounded
default: False
.jump_height
default: 2
.jump_up_duration
default: 0.5
.fall_after
default: 0.35
will interrupt jump up
.jumping
default: False
.air_time
default: 0
.traverse_target
default: scene
by default, it will collide with everything. change this to change the raycasts' traverse targets.
.ignore_list
default: [self]
.on_destroy
default: self.on_disable
.y
default: ray.world_point.y
Methods
on_window_ready()
update()
input(key=None)
jump()
start_fall()
land()
on_enable()
on_disable()