Moving Platforms

Creating Platforms that can move at a certain position

Setting Up the Platform:

First select the platform which will be the designated moving object. Then create an new C# script and attach the script the game object. Select the moving platform and duplicate it twice, and name the first object “Target A” and the second duplicated object “Target B”. Drag target B to an desired location which the moving platform will travel to.

Scripting the Movement:

We first need to assign several variables, the speed which the platform is moving at, the transform targets and finally an private Boolean which will track whenever the platform as reached its destination so it begin its journey to the next target. By default we need to set the Boolean to false, when it reaches its target, we can switch it back up to true.

--

--

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.