mirror of
https://port.numenaute.org/aleajactaest/bazar_alea.git
synced 2024-11-09 16:59:02 +00:00
37 lines
795 B
GDScript
37 lines
795 B
GDScript
extends CharacterBody3D
|
|
|
|
|
|
@export var speed = 5.0
|
|
@export var jump_velocity = 4.5
|
|
|
|
var camrot_h:float = 0.0
|
|
var camrot_v:float = 0.0
|
|
@export var h_acceleration:float = 10.0
|
|
@export var v_acceleration:float = 10.0
|
|
@export var h_sensitivity:float = 0.5
|
|
@export var v_sensitivity:float = 0.5
|
|
|
|
|
|
# Get the gravity from the project settings to be synced with RigidBody nodes.
|
|
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
|
|
@export var otherplayer:bool = true:
|
|
get:
|
|
return otherplayer
|
|
set(value):
|
|
otherplayer = value
|
|
|
|
|
|
func set_otherplayer(value:bool):
|
|
otherplayer = value
|
|
|
|
|
|
func _ready():
|
|
$SpringArm3D/Camera3D.set_current(false)
|
|
|
|
|
|
func set_current_camera():
|
|
$SpringArm3D/Camera3D.set_current(true)
|
|
|
|
|
|
func set_id(value:int):
|
|
$PlayerNetworkingComponent.set_id(value)
|