parenting a camera with a sphere

i paired a camera with a sphere so the camera would follow the sphere, but when i play it the camera rotates with the sphere. how do i make it just follow?

Create a new Javascript, add it to the camera, set it's target as your sphere and tweak the offset coordinates to determine the offset.

> var target : Transform; var offset :
> Vector3;
> 
> function LateUpdate(){
>     transform.position = target.position + offset; }

Connect the camera to the sphere with a Configurable.Joint and make sure it's X,Y and Z rotation is set to FREE. If you're using physics, which you probably are with a sphere, the camera might affect your physics a little... if so, create an empty game object and attach that to the sphere with the joint and free rotation, then nest the camera to the empty object.

you could make them separate objects again, add a SmoothFollow camera control script, or make your own script to say in the Update function:

transform.position = Vector3(PlayerObject.position.x,PlayerObjcect.position.y,(PlayerObject.position.z + 5))

don't forget to make a var PlayerObject : Transform; and then attach that javascript to your camera