
How the game behaves · R.E.P.O. v0.4.0 · read from a local copy
Driving a vehicle and staying upright
A vehicle is an item with a state and a timer of its own.
A vehicle in R.E.P.O. is driven by forces rather than by a steering wheel alone: it has a soft speed limit as well as a hard one, its wheels grip through separate front and back forces, and stabilisation, lift and tilt correction are what keep it from rolling over.
What the game establishes
- A vehicle is an item with a state and a timer of its own. (checked against the game's own files)
- It has a steering transform and a rigid body. (checked against the game's own files)
- Speed is limited by a soft maximum as well as a hard one, with limits on the body's velocity and angular velocity. (checked against the game's own files)
- There are separate limits for how fast it may move downward, with the speeds they apply between. (checked against the game's own files)
- Steering carries a speed, a damping, a maximum angle, a turn multiplier and a maximum turn force. (checked against the game's own files)
- Stabilisation is a force with angular drag, a maximum tilt angle, a correction torque and lift. (checked against the game's own files)
- Forces hold the vehicle to its seat and roll it towards the occupant, with a player lift and a boost multiplier. (checked against the game's own files)
- Forward and reverse each have their own maximum speed and acceleration, with deceleration and a hyper setting. (checked against the game's own files)
- Yaw has a spring strength, a damping and an angular drag of its own. (checked against the game's own files)
- Front and back wheels are separate, each with a force point, a minimum and maximum force and a maximum speed, plus a grounding ray and force. (checked against the game's own files)
- Movement, stabilisation, steering, drift, airborne, wheel, player physics and a stair approach assist each have a switch. (checked against the game's own files)
- A vehicle knows whether it is racing and has a speed to use when no race is running. (checked against the game's own files)
In play
A vehicle is an item with its own state and its own timer rather than a special mode the game switches into. That state is what the rest of the driving behaviour is built on.
It steers from a transform of its own. There is a steering transform and a rigid body, and the vehicle turns by applying a force rather than by setting a heading directly.
Speed is bounded more than once. There is a hard maximum in the usual unit and a soft maximum as well, with a decay rate for it, along with limits on how fast the body may move and how quickly it may spin.
Falling is bounded too. Separate values cover how fast it may move downward and the speeds between which that downward limit applies, which is why a vehicle drops in a controlled way rather than as a free weight.
Steering has its own settings. There is a steering speed, a damping, a maximum angle, a multiplier for turning and a maximum turning force, so how sharply something turns is a set of values rather than one number.
It holds itself up. Stabilisation is applied as a force with angular drag, a maximum tilt angle, a correction torque and lift, which is why a car can be knocked about without immediately ending on its roof.
The seat is part of it as well. There are forces that pull the vehicle down towards its seat and roll it towards the occupant, along with a lift when a player is aboard and a multiplier when the boost is used.
Forward and reverse are separate. Each has its own maximum and its own acceleration, with deceleration between them and a hyper acceleration and speed on top, so the same vehicle can be gentle or frantic depending on how it is driven.
Yaw is sprung. There is a yaw spring strength and damping and a yaw angular drag of its own, which is how the vehicle can be turned and then settle rather than spin on.
The wheels do the work. Front and back wheels are separate, each with a force point and a minimum and maximum force, and there is a grounding ray distance and a grounding force, so grip is decided per axle rather than for the whole body.
The physics can be switched on and off in parts. Movement, stabilisation, steering, drifting, airborne behaviour, wheels, player physics and a stair approach assist each have their own switch, which is why the same body can behave like a car, a boat or something stranger.
It also knows whether it is racing, with a speed to use when no race is running, so a vehicle can be told to behave differently depending on the mode it is in.
What this entry does not tell you: how fast any vehicle goes, how much it can take, or how long a fall has to be to hurt. We have not verified those numbers, so we do not print them.
Related
How the game behavesCarts, grabbing and the physics of lootA cart is modelled with its own physical behaviour.
How the game behavesDrifting a vehicleDrifting is a system with its own switch on the vehicle.
How the game behavesThe lean a vehicle takes from its speedAccelerating lifts the nose and slowing drops it, each with a force and a maximum of its own.Version and sources
A local copy of the game, read only. The grounding for each fact is listed on the technical reference pages; nothing here is estimated. Documented build: 0.4.0.