How to code Path movement

Turn object and path object on to be able to code using Coblocks; This is done with a single click to the object under the Name Tag. The Path object is found under the Special library category. The object will travel the direction of the arrows of the path in the space. Adjust the blue dots to arrange a specified path.

Here is sample code:

4 Likes

Can the dots on a path be individually named and accessed in code? They must have properties such as position(X, Y, Z)
For instance a game where a player piece is supposed to move around a game board. If player rolls a N on a die, move to the position of the Nth dot from the dot the player game piece is currently on.
Paths could then be used to illustrate equations and data in 3 dimensions. Students could create an equation for a roller coaster or a mountain range of rain fall history. A 3D periodic table?

2 Likes

Hello, MrWolken

Points can be accessed from script code as usual items

Changing a path trajectory during animation of another object’s movement is possible but it will cause disortion of moving because length of path will be not recalculated. Could you please described you game in more details?

We are working of chart object for this purpose. Sure you can try use paths to illustrate equation, but main idea is to use it for moving other objects.

1 Like

Hi Stephanie,
thank you for sample.
I only want add something about editing path. There are two ways to add new vertices to existing path.

  1. Copying vertices by dragging them with ALT button pressed. New vertex will be automatically added to the nearest segment.

  2. Entering mode “Path editing”. Here you can choose manually a position on path to add new vertex.

1 Like

This is exciting! Thanks!

2 Likes

Video tutorial is now available:

1 Like

A quick recommendation to set that path object to Opacity = 0 so your characters move around with more of a free illusion.

1 Like

Hello Clint,
for hiding path in play mode there is a setting “Show in Play mode”. Switch it off to hide a path during playing.

1 Like

Brilliant! I’m not sure how I missed that before. Thank you!

1 Like

when i try to create a path if i attach my figure to it it move not on the path but in similar way just in another place, only if it detached it move on the path

1 Like

Hi @Vitaly_Sh,

there is a bug with on path movement, that we have already fixed and will update in the coming days

1 Like