Question about iTween Uneven Terrain example.

Hi,

I'm somewhat baffled by my attempts to understand the iTween uneven terrain example. The example scene (for Javascript) works fine, but when I attempt to recreate the behaviour in a scene of my own it doesn't work. I've copied all the elements of the example scene component for component, I have the Puppeteer script in an empty gameobject, I have told it to use my character and arrow objects, and I have placed iTween itself in a Plugins folder in my project view.

On running the scene, first the Arrow object doesn't track my mouse movements as it does in the example. If I click anywhere then the Character object moves to the position of the Arrow object (which remains where it was placed in the scene view), but does so almost instantly, with no nice smooth movement in between as in the example.

I have no idea what I might be missing; I created a simple project and scene to test this and everything looks exactly the same as the example scene.

Can anyone help me with this?

I can't recall everything I put into that example but one thing to look for is to make sure the object that is going to be riding along your terrain is in a layer that is being ignored by raycast otherwise the system will never be able to read the surface for a successful scan of the terrain and will instead think your object is the ground. Make sense?

Ok, I've prodded this a bit more and I've found what i was overlooking. Nothing to do with iTween in fact, but the figures in the puppeteer script for the raycasting are set for a terrain/object of the size in the example (50x50) where I was trying to use the same script on a much larger area. So, a line which read:

Physics.Raycast (cameraRay.origin,cameraRay.direction,hit, 50);

I changed to:

Physics.Raycast (cameraRay.origin,cameraRay.direction,hit, 500);

and it started working! :)

I also tweaked the time figures for the actual iTween call so that it looked better over the greater distance.

Sorry for the confusion, but I have learned quite a lot by solving this (mostly to read the documentation for EVERYTHING, not just what I think is giving the problem).