five-on-it / packages/sim/src/character / CHARACTER
Variable: CHARACTER
constCHARACTER:object
Defined in: packages/sim/src/character.ts:92
Tuning of the on-foot avatar; one kind of character for now.
Type Declaration
accel
readonlyaccel:30=30
How fast the character reaches its speed (m/s²): a sprint takes about 0.4 s.
brake
readonlybrake:45=45
How fast it stops when the input is released (m/s²).
cooldownTicks
readonlycooldownTicks:30=30
Ticks before another enter, exit or reset is accepted.
coverReach
readonlycoverReach:0.6=0.6
How far beyond the capsule's surface a wall still counts as cover (m).
coverSpeed
readonlycoverSpeed:3=3
Pace along the cover while pinned to it (m/s): a crouching walk, no sprint.
enterRange
readonlyenterRange:3=3
How far beyond a car's half length the action key still enters it (m).
fleeSpeed
readonlyfleeSpeed:number
The fastest a bystander runs away from danger (m/s): 30 km/h, a little slower than a sprint (FLEE_PACE).
halfHeight
readonlyhalfHeight:0.6=0.6
Half the straight part of the capsule (m); 1.8 m tall in all.
jumpSpeed
readonlyjumpSpeed:5.5=5.5
Upward speed of a jump (m/s): about 1.5 m high.
mass
readonlymass:80=80
Mass (kg); light enough for a car to shove aside.
peekReach
readonlypeekReach:1=1
How far along the cover its end is looked for when popping up at tall cover (m).
radius
readonlyradius:0.3=0.3
Capsule radius (m).
runSpeed
readonlyrunSpeed:number
Sprinting speed (m/s), with the run key held: 35 km/h, a sprinter's pace. Every person runs with it at most (the chasers, the guards, the police on foot): nobody outruns the player.
walkSpeed
readonlywalkSpeed:4=4
Walking speed (m/s): about 14 km/h.