How to move towards point over fixed time then stop moving ? (camera)

Hi, i have a 3D model set on origin (0,0,0) and then i used setDistance to position the camera far away (2500). What i need to now, is to move the camera towards the object and stop moving just in front.

I tried using orbit, but is not the result i need to achive. I also tried to subtract setDistance in the draw function but didn’t work.

Thanks !

check the ofCamera documentation for setting camera related parameters
but what you really want to check is ofNode, as ofCamera inherits from it.

there are several method, most probably you would want to use something like move(…)

Hi, thanks ! i was able to do it with camara.move(0, 0, - time); while time being one second :slight_smile: !

I have another question, i have a planePrimitive i’m using as “floor” with an applied texture. The problem is that when i render it its like invisible until I do any camera movement. I assume this is because its a 2d object instead of 3d, so it being rendered at the origin axis 0,0,0 it does not have volume. Any idea how can i do that? i tried using move on the setup for that plane but didn’t work

Found the solution ! i was using .set(width, height) but didn’t use .setPosition(x,y,z), I used a setPosition(0,0,-5) and done !