Hinge Point Events
Overview
Hinge Points can attach and detach objects while an experience is being played using Hinge Point events. That includes players, which means you can easily create setups where players are moved with objects they are standing on/in. This opens up many possibilities, including:
- Platforms that move the player
The player is still able to move on the platform while it is animating.
-
Any kind of "public transport" that moves the player, like a bus, subway, or aircraft.
-
Autonomous vehicles like taxis, self driving cars, and more.
Pro Tip: when using a Trigger to attach a Player to an animated hinge/hinge group, keep the animation on the hinge/group moving slow(ish) or else the Player will be left behind. For example, think of standing on a car as it accelerates to 100 MPH in 1 second. You would fall off!
How To Create a Platform that Moves the Player
-
Add a shape for the platform itself, a Trigger, and a Hinge Point to a scene.
-
Place the Trigger and Hinge Point in the center of the platform.
-
Add the following events to the Trigger:
On: Entered by Object
& If: Target is Player
Then: Other Object (select the Hinge Point)
Set Hinged Object
Entering Object
Event comment: The Player will be attached to the Hinge Point when the enter the Trigger, and will move with it until released.
On: Exited by Object
& If: Target is Player
Then: Other Object (select the Hinge Point)
Release Hinged Object
Event comment: The Player will be detached from the Hinge Point, allowing them to move freely again.
-
Group the platform, the Trigger, and the Hinge Point together.
-
Animate the new group. Set it to loop if you want to be able to jump on it multiple times.
- Play the Viewer and try it out!