Skip navigation

Category Archives: Camera Movement

Parallaxing is something I’ve been after doing for a while – because it looks awesome!

I moved the different planes using the Translate function: http://unity3d.com/support/documentation/ScriptReference/Transform.Translate.html

All you need to do is set different speeds for each section.

These are good examples of effective parallaxing: http://www.youtube.com/watch?v=sLNQU5nfQvQ

http://www.youtube.com/watch?v=HXREh5hacV0

I’ll have to try and upload a video of it working on Dream Swing. Getting this done helped me to figure out the scale of the world – I don’t want a big piece of landscape moving in the background – it should be small things like bits of grass etc and the spider should roughly to scale – previously I had a tree that was way out of scale.

Converted the SmoothFollow2D.js example script file to C# with a little help from http://forum.unity3d.com/threads/71409-SmoothFollow2D.js-to-SmoothFollow2D.cs-is-giving-me-a-no-render-ship (I think the issue was that  you can’t directly access each part of a vector in C# like you can in JavaScript).  This revealed a bug that saw the camera slowly sinking through the ground, which bizarrely seemed to fix itself  :S I’m always dubious of miracle fixes as they also tend to unfix themselves later on.

I got a rope sort of working using the http://www.unifycommunity.com/wiki/index.php?title=LineRenderer_Ropehttp://answers.unity3d.com/questions/9705/tie-objects-together.html and http://www.unifycommunity.com/wiki/index.php?title=3D_Physics_Based_Rope, which linked me to the rope editor from www.reverieinteractive.com that I’m now playing about with.

 

Rope! Sort of.

I’d like to write my own but I’d rather make the game now and worry about doing it myself later. Perhaps not the wisest way of doing things though, however I wouldn’t be surprised if getting it to do what I need is as hard as doing my own version.