Linear Movement
Move objects on a straight line.
Authors and contributors to this experimental 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.
See parameters
- Parameter 0: 👾 Object
- Parameter 1: 🧩 Behavior
- Parameter 2: 🟰 Operator
- Parameter 3 (🔢 Number): Value
Technical note: parameter 4 are internal parameters handled by GDevelop.
Speed on Y axis
Change the speed on Y axis of the object.
See parameters
- Parameter 0: 👾 Object
- Parameter 1: 🧩 Behavior
- Parameter 2: 🟰 Operator
- Parameter 3 (🔢 Number): Value
Technical note: parameter 4 are internal parameters handled by GDevelop.
Behavior conditions
Speed on X axis
Compare the speed on X axis of the object.
See parameters
- Parameter 0: 👾 Object
- Parameter 1: 🧩 Behavior
- Parameter 2: 🟰 Relational operator
- Parameter 3 (🔢 Number): Value to compare
Technical note: parameter 4 are internal parameters handled by GDevelop.
Speed on Y axis
Compare the speed on Y axis of the object.
See parameters
- Parameter 0: 👾 Object
- Parameter 1: 🧩 Behavior
- Parameter 2: 🟰 Relational operator
- Parameter 3 (🔢 Number): Value to compare
Technical note: parameter 4 are internal parameters handled by GDevelop.
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.
See parameters
- Parameter 0: 👾 Object
- Parameter 1: 🧩 Behavior
- Parameter 2: 🟰 Operator
- Parameter 3 (🔢 Number): Value
Technical note: parameter 4 are internal parameters handled by GDevelop.
Behavior conditions
Speed
Compare the speed of the object.
See parameters
- Parameter 0: 👾 Object
- Parameter 1: 🧩 Behavior
- Parameter 2: 🟰 Relational operator
- Parameter 3 (🔢 Number): Value to compare
Technical note: parameter 4 are internal parameters handled by GDevelop.
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.