how do i attach the main camera to a path or import an animated camera from maya to unity and have that be the main camera ?
i just want to make a architecture type walk through around a city.
how do i attach the main camera to a path or import an animated camera from maya to unity and have that be the main camera ?
i just want to make a architecture type walk through around a city.
Welcome to Unity aspen.
I use Vector3.Lerp in a script that is attached to the camera itself. Sooo, when you activate the camera, it takes off.
I move the camera from one point(GameObject.transform.position) to another point via a Vector3.Lerp() in the Update(); You could also Lerp the rotations to make 'em nauseous along the way.
transform.LookAt(target); // Orient the camera
transform.position = Vector3.Lerp(destinations[i].position, destinations[i + 1].position, posi); // destinations are in an array
posi += Time.deltaTime / totalTime * FlySpeed;
Welcome and have fun.
thanks, but isn’t there some way to just set keyframes with translate and rotations and then edit them in with a curve/animation editor ?
hmmm … I think there is an animation editor with the MAC version of Unity, but not with the PC version yet. That is expected around the end of summer.
Someone else could comment on using the animation editor, instead of script, assuming you are mac.
If you want to animate in Maya and then just have it ‘work’ in Unity, simply animate a cube in Maya to make the path exactly how you want it. Then when you import your ‘camera’ cube flying animation into Unity, child the camera under the cube (drag the camera onto the cube to make it a child) and it will inherit the cube’s transforms and thus fly around how you animated in Maya. Make sure to turn off the renderer on the cube so it’s not visible.
I did what gtjuggler did, works great.
Alternatively you can wait a few months until the 2.6 version arrives which will support great keyframing possibilities. This would then be the most flexible and best solution.