Skip to content

Commit 4ca3e94

Browse files
Update controller with correct float type on params
1 parent 6d9f9c8 commit 4ca3e94

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

core/character_controller_3d.gd

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,74 +68,74 @@ signal stopped_floating
6868
## Controller Gravity Multiplier
6969
## The higher the number, the faster the controller will fall to the ground and
7070
## your jump will be shorter.
71-
@export var gravity_multiplier := 3.0
71+
@export var gravity_multiplier : float = 3.0
7272

7373
## Controller base speed
7474
## Note: this speed is used as a basis for abilities to multiply their
7575
## respective values, changing it will have consequences on [b]all abilities[/b]
7676
## that use velocity.
77-
@export var speed := 10
77+
@export var speed : float = 10.0
7878

7979
## Time for the character to reach full speed
80-
@export var acceleration := 8
80+
@export var acceleration : float = 8.0
8181

8282
## Time for the character to stop walking
83-
@export var deceleration := 10
83+
@export var deceleration : float = 10.0
8484

8585
## Sets control in the air
86-
@export var air_control := 0.3
86+
@export var air_control : float = 0.3
8787

8888

8989
@export_group("Sprint")
9090

9191
## Speed to be multiplied when active the ability
92-
@export var sprint_speed_multiplier := 1.6
92+
@export var sprint_speed_multiplier : float = 1.6
9393

9494

9595
@export_group("Footsteps")
9696

9797
## Maximum counter value to be computed one step
98-
@export var step_lengthen := 0.7
98+
@export var step_lengthen : float = 0.7
9999

100100
## Value to be added to compute a step, each frame that the character is walking this value
101101
## is added to a counter
102-
@export var step_interval := 6.0
102+
@export var step_interval : float = 6.0
103103

104104

105105
@export_group("Crouch")
106106

107107
## Collider height when crouch actived
108-
@export var height_in_crouch := 1.0
108+
@export var height_in_crouch : float = 1.0
109109

110110
## Speed multiplier when crouch is actived
111-
@export var crouch_speed_multiplier := 0.7
111+
@export var crouch_speed_multiplier : float = 0.7
112112

113113

114114
@export_group("Jump")
115115

116116
## Jump/Impulse height
117-
@export var jump_height := 10
117+
@export var jump_height : float = 10.0
118118

119119

120120
@export_group("Fly")
121121

122122
## Speed multiplier when fly mode is actived
123-
@export var fly_mode_speed_modifier := 2
123+
@export var fly_mode_speed_modifier : float = 2.0
124124

125125

126126
@export_group("Swim")
127127

128128
## Minimum height for [CharacterController3D] to be completely submerged in water.
129-
@export var submerged_height := 0.36
129+
@export var submerged_height : float = 0.36
130130

131131
## Minimum height for [CharacterController3D] to be float in water.
132-
@export var floating_height := 0.75
132+
@export var floating_height : float = 0.75
133133

134134
## Speed multiplier when floating water
135-
@export var on_water_speed_multiplier := 0.75
135+
@export var on_water_speed_multiplier : float = 0.75
136136

137137
## Speed multiplier when submerged water
138-
@export var submerged_speed_multiplier := 0.5
138+
@export var submerged_speed_multiplier : float = 0.5
139139

140140

141141
@export_group("Abilities")
@@ -189,7 +189,7 @@ var _direction_base_node : Node3D
189189
@onready var swim_ability: SwimAbility3D = get_node(NodePath("Swim Ability 3D"))
190190

191191
## Stores normal speed
192-
@onready var _normal_speed: int = speed
192+
@onready var _normal_speed : float = speed
193193

194194
## True if in the last frame it was on the ground
195195
var _last_is_on_floor := false

0 commit comments

Comments
 (0)