The Car behavior allows an object to accelerated forwards and backwards and have steering. It also has a simple "drift" feature where the object can "skid" around corners (by pointing in a different direction to that it is moving in). For an example of the Car behavior see the Driving example in the Start Page.
By default the object is controlled by the arrow keys on the keyboard (Up to accelerate, down to brake, left and right to steer). To set up custom or automatic controls, see the behavior reference summary.
The Car behavior will bounce off any objects with the Solid behavior. The effect on the movement depends on the angle of impact - glancing collisions nudge the car off its current path, whereas head-on collisions stop it more or less dead. The amount of speed lost depends on the Friction property.
The maximum speed, in pixels per second, the car can accelerate to.
The rate the car accelerates at, in pixels per second per second.
The rate the car brakes at, in pixels per second per second.
The rate the car rotates at when steering, in degrees per second.
The rate the car recovers from drifts, in degrees per second. In other words, this is the rate the angle of motion catches up with the object angle. The angle of motion can never be more than 90 degrees off the object angle. If the drift recover is greater or equal to the Steer speed, no drifting ever occurs. The lower the drift recover, the more the car will drift on corners.
The amount of speed lost when colliding with a solid, from 0 (stop dead) to 1 (speed not affected at all). For example, to slow the speed down by half when colliding with a solid, set Friction to 0.5.
If enabled, the behavior will set the object's angle, otherwise the behavior never changes the object's angle.
If enabled, the car movement is controlled by the arrow keys on the keyboard. Disable to set custom controls. For more information see the behavior reference summary.
Compare the current speed of the car, in pixels per second.
True if the current speed is non-zero. Invert to test if the car is stopped.
Set the corresponding properties. See Car properties for more information.
Set the current speed the object is moving at, in pixels per second.
Simulate one of the movement controls being held down. Useful when disabling Default controls. See the behavior reference summary for more information.
A shortcut for setting the speed to zero.
Return the corresponding properties. See Car properties for more information.
Get the current object's movement speed, in pixels per second.
Get the object's current speed on each axis, in pixels per second. For example, if the object is moving to the left at 100 pixels per second, VectorX is -100 and VectorY is 0.