We are about to switch to a new forum software. Until then we have removed the registration on this forum.
As the title says I am trying to plot a certain course for a camera to move around a 3D space. In a way that after a certain amount of time it would glide from the first plotted XYZ to another one.
I've looked up moveEye examples and believe it is not what I am looking for. I was just wondering if anyone could direct me towards a resource, a library or generously throw some code at me.
Much appreciated.
Answers
Post what you have.
And perhaps you don't know this, but the camera requires three bits of information -
I do understand how to set a camera up. What I don't understand is how to slowly glide between the two camera positions. I know I am missing a piece of code. This is what I currently have.
(Is this really a library question? Which one?)
Look at
lerp()
pleaseIt is not a library question. I posted it in "How to" but for some unknown reason it ended up here. Maybe it was moved because I mentioned a library in my question.
I'm going to go and check OCD library. Maybe I can achieve what I want with that one.
Well I guess it's a good thing this was moved into a library section. I did some digging around OCD library and realised that I can achieve what I want with it. Thanks everyone for help.
You can? Impressive. And I was wasting my time to figure it out all this time. If I hadn't noticed your comment, I would probably have spent an hour to figure it out fully.
Lol not sure if sarcasm or not but if you were wondering yourself how to do something like this here is my code. It requires OCD library.
A little sarcasm - I was sad that I had wasted time on something that can already be done by a library.
Well I was killing myself for about half a day trying to achieve it without a library and at that point realised that it can be done way easier. And to be fair from the very beginning I was curious if anyone could recommend a library if it was to be quicker. Thanks for the effort of trying to help.
Well, I should thank you - the OCD library is very cool.
Interesting! I hadn't looked at that library.
The Obsessive Camera Direction (OCD) Library by Kristian Linn Damkjer is linked from the Processing Libraries page, and also available here:
truck()
boom()
dolly()
andpan()
take distances -- this can be updated periodically based on a frameRate or timer.Alternately, if you want to enter absolute distances between a starting and stopping point you could generate intermediate distances by using
lerp()
and an amount on your x,y,z pairs (I believe that this would work using any camera, or e.g. QuesyCam, PeasyCam etc. -- although I have not tested).