-
Camera movement by expression, stopping at a certain point
Hi guys!
Again I have a question about expressions, this time really simple I think! Although I still don’t get the result I want…
I want a slow camera movement over the x-axis which stops as soon as I zoom in with the camera by keyframes and starts over again as soon as the camera zooms out. I’ve tried it with the code below and it works so far except that the camera jumps back to the initial position when I zoom in. (Somehow logical with this code! ;-)) Same goes the other way when zooming out…
What I’m trying to accomplish is, that as soon as the camera zooms in, it should take the ACTUAL x-value at this time and stop there until I zoom out again – then it should start moving again over the x-axis, beginning from the actual x-value (the x-value from the camera-position-keyframe).Thanks for your time!
Klemensx = value[0] + time * 30;
y = transform.position[1];
z = transform.position[2];
x2 = value[0];
if (z < -1777)
{[x, y, z]}
else
{[x2, y, z]}