Platform fix

No sooner had I posted for Monday, I fixed the parenting of the first/third person controllers to the platform problem. I kept the way the platform obtained each of the positions using individual empties and drawn gizmos for those positions. I then completely changed the way the platform was moved using ‘Vedtor3.MoveTowards’. I also included the check for the ‘Player’ tag prior to parenting. With this in place my platform mover worked like a champ! I will create a video tutorial on this once I get it perfected

What I like about the empty game objects occupying the location of the from and to destinations is that I can move those points anywhere in space (x, y or z) and the platform will track to them without a problem 🙂 .

I have also created a custom package for this ‘Moving Platform’ that I can import to other projects such as the Unity Book project I am working to convert to the new Unity5. This package bundled up everything I did for the fix including the walls keeping the player from walking off the platform while in motion, scripts and the positional empties.

Below is a demonstration of the ‘Moving Platform’ in action in my test project  showing how the collider walls prevent the player from walking off the platform then I switch over to my Unity book project where I import the package. There I demonstrate a fly over of the landscape from position one to position two. Lastly I show the extensibility by adding a third position and preform a fly through of two positions (I skip the fly back for time reasons). I will create a full tutorial of this moving platform next week.

Leave a Reply

Your email address will not be published. Required fields are marked *