![]() ![]() While Interpolate is not a traditional movement, it’s great for shifting immovable objects within a scene. Our sixth movement behavior is Interpolate. Like Accelerate, Move offers the option to select a direction, while Move To (like Accelerate Toward) allows the entry of a specific x/y coordinate, so the actor can move towards a point like the mouse position or another actor. With “Stacked” selected, only the most recently triggered Move or Move To behavior will control the actor. With “Additive” selected, multiple Move or Move To behaviors will combine both their velocity and direction. Move and Move To also have the option to control how they interact with other movement behaviors. As long as these behaviors are active, therefore, they will override (or cause the actor to temporarily ignore) movement behaviors like Accelerate, Accelerate Toward, and Change Velocity. However, they act continuously upon an actor. These both function similarly to the “Change Velocity” behavior in that they set a direction and a speed for an actor. ![]() We’ll address our next two behaviors together: “Move” and “Move To”. The Change Velocity behavior would have increased the actor’s speed to 150, but then allowed the “Accelerate” behavior to continue to act. After 2 seconds, the actor would have accelerated another 50, for a final speed of 200 after 2 seconds. At this point, we could have a Change Velocity behavior trigger, changing the actor’s speed immediately to 150. After 1 second, the actor has accelerated to 50. For example, imagine we have an actor accelerating from 0 to a maximum actor speed of 200 at a rate of 50 per second. Change Velocity is therefore a behavior that triggers, acts, and subsequently does nothing until it is triggered again. Once this speed is set, however, other movement behaviors will act upon the actor, such as the acceleration of gravity, or friction resistance against another actor. However, instead of accelerating at a constant rate, this behavior will instantly change the actor’s movement to a set velocity. Like Accelerate, this behavior allows us to select a direction and whether or not it is relative to the scene or the actor. Accelerate Toward will continue to affect an actor as long as the conditions for the behavior are met (as we’ll discuss in our tutorial on “rules”). Like Accelerate, Accelerate Toward has the option to select an acceleration rate and whether the coordinates are relative to the scene or to the actor. This behavior has the advantage of being able to select the location of another object, as we’ll discuss later in our “attributes” tutorial. This behavior functions exactly like Accelerate, except instead of selecting a direction, we can select a set of x/y coordinates. The next behavior is “Accelerate Toward”. ![]() Accelerate will continue to affect an actor as long as the conditions for the behavior are met (as we’ll discuss in our tutorial on “rules”). In the Accelerate behavior, we can set a direction (chosen from 0 to 359 degrees), an acceleration rate, and whether the direction is relative to the actor or to the scene. This behavior is very useful for movements that involve gravity, jumping, being thrust from a rocket, and more. Accelerate will gradually increase the movement rate of an actor until something else intervenes or the maximum velocity of the actor is reached. ![]() There are six primary behaviors dedicated to movement and each is tailored for a specific purpose. In this tutorial, we’re going to learn more about a few specific movement behaviors that can help your actors move the way you want. As you saw earlier, there are numerous behaviors that control how actors move, interact, and behave within a scene or a game. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |