In this video you will learn how to use the setVehicle procedure.

Any object in Alice can be set to act as the vehicle of another object. When you set an object as the vehicle of another object both objects are synchronised, and when the vehicle moves the other object will follow the same movement.

The vehicle property is useful in scenes like a person riding a vehicle or horse, or a pet following its master.


Setting a Vehicle for the Camera

An object can be set as a vehicle for the camera, so that the camera will follow the object when it moves. This video will show you how.


To unset the vehicle in your code, set the vehicle back to "this"


Activity - Orca Rider

Have a look at the example below.

Design your own animation where a person is sitting on top of an Orca and they move across the top of the water together.

Hint: Use OneShots to put the person in a sitting position, then set the Orca as the person's vehicle.



Orca Rider Example

Here is an Orca Rider example by Bec, together with the code used:



home   left arrow   right arrow