Experimenting with Unity: Part Two
Posted on 10th February 2013 | Catagories: 3D, Illustration, Scripting, Unity
11 commentsThis is the second in an ongoing series of Unity related posts. Click here to read part one and try the day/night demo.
The next thing I set out to develop in Unity was a simple, touch controller ‘avatar’ that could move with a natural, fluid motion – the idea being that this simple interaction would be rewarding in it’s own right. I was hugely inspired by Journey for PS3, and how the players movements made up a large part of the overall experience – simply travelling through the world became one of the biggest rewards for playing the game.
As before, the demo below uses the Unity Web Player. To interact, click and drag anywhere inside the play area.
The behaviour of the trailing ‘legs’ proved to be the most difficult and interesting part of the process. I initially assumed Unity’s built in physics engine could take care this, but unfortunately the high number of joint constraints and the relatively ‘vague’ nature of the engine resulted in some pretty erratic behaviour. Instead, I opted for writing a custom script based on this brilliant bit of code. In combination with Unity’s line renderer, it gave me the perfect result with surprisingly little overhead.
A few extra notes:
- Clicking on the play area actually updates the position of an invisible ‘pointer’ object. The player, in turn, is continuously moving towards the pointer, at a speed proportional to the distance between them.
- The length of the legs can be adjusted during run time, providing a neat visual indicator for various attributes such as the players health or progression.
Thanks for reading! In the next post, I’ll take a look at closer the art style, graphics and iOS optimisation.
-
http://twitter.com/stalkbrandon Brandon V. Fletcher
-
http://www.miletbaker.com/ Jon Milet Baker
-
http://twitter.com/stalkbrandon Brandon V. Fletcher
-
-
-
Becca
-
http://twitter.com/stalkbrandon Brandon V. Fletcher
-
-
Barrie
-
http://joshuadance.com/ Joshua Dance
-
Bryan J Bryce
-
Tyson Cai
-
Tyson Cai
-
Tyson Cai
-