In the new version of Miarmy 4.5, we can detect and feel any geometry and interactive with it. We can achieve the roller coaster effect easily.

Reference: Geometry Logic Sentence

Maya Geometry >

 

Prerequirements

  1. Curve Pin
  2. Geometry Sentences are 100% same as Terrain, but only in different situations

 

Example

In below example we'll show you how to create the roller coaster by curve pin and geometry logic.

Create a geometry and a curve match the track.

 

Use curve pin, the agents will follow the curve, but they have wrong roll directions.

 

So let's create two decision nodes to fix the roll:

 

Now, wee get the right roll,

 

Under the hood

We control the agent by input geometry sentence, for left/right roll, you can use:

higher geometry:??? on LEFT

higher geometry:??? on RIGHT

 

With the same method, we can rotate the agent forward/backward based on the downhill and uphill:

I'm on geometry:??? DOWNHILL

 

I'm on geometry:??? UPHILL