Skip to content

Linear Movement

Move objects on a straight line.

Authors and contributors to this community extension: 4ian, Jurfix.


Move objects on a straight line or according to their angle.

It can be used for simple enemies or bullets. It's usually not adapted for players (other behaviors are a better choice) or bullets fired with the actions provided by the "Fire Bullet" behavior (these bullets are already moved using a force).

Tip

Learn how to install new extensions by following a step-by-step guide.

Linear movement

Move objects on a straight line.

Behavior actions

Speed on X axis
Change the speed on X axis of the object.

Speed on Y axis
Change the speed on Y axis of the object.

Behavior conditions

Speed on X axis
Compare the speed on X axis of the object.

Speed on Y axis
Compare the speed on Y axis of the object.

Behavior expressions

Expression Description
Object.LinearMovement::SpeedX() Return the speed on X axis of the object.
Object.LinearMovement::SpeedY() Return the speed on Y axis of the object.

Linear movement by angle

Move objects ahead according to their angle.

Behavior actions

Speed
Change the speed of the object.

Behavior conditions

Speed
Compare the speed of the object.

Behavior expressions

Expression Description
Object.LinearMovementByAngle::Speed() Return the speed of the object.

This page is an auto-generated reference page about the Linear Movement extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.