I have a list of objects stored in an ArrayList instance that I which to iterate over and for each object in the list I will have the camera interpolate from the current camera position to a new position relative to the next item in the list. I am currently using Proscene library and its camera infrastructure. If I do what I have described then what happens is the camera will move from object to object without stopping until it reaches the end of the list where it will end with the camera looking at the final object. What I want to do is have it pause for 5-10 seconds at each object before moving on to the next. I have done a lot of tween and keyframe based animation with Sparrow and other iOS based libraries and have a good idea of how to solve this problem but I cannot seem to find a method or methods in Processing to allow me to do this. Here is the code that would solve my problem if I was doing this with Sparrow SDK for iOS. I will explain the code after since I cannot expect everyone to understand Objective-C.
- [[self.juggler delayInvocationAtTarget:self byTime:5.0] goToNextObject:[objectList objectAtIndex:i+1]];
- [self.juggler delayInvocationAtTarget:self byTime:5.0]
This part of the call does one thing. It takes the juggler which manages timers and animation and tells it that to delay invocation to the target "self" by 5 seconds. This means that in 5 seconds from when this call runs it will call a method from the instance of "self".
The next part of the method describes the method that will be called in 5 seconds.
- goToNextObject:[objectList objectAtIndex:i+1]
Essentially
what this would do is cause the camera to interpolate to each object in the list, pausing for a given amount of time before moving to the next object in the list.
I'm not familiar with programming with Java, and programming with Processing is the closest thing I have done in that respect. I would really like to avoid having to create the wheel with this if the functionality is already out there. If anyone has done something like this or has any insight to how that would be much help. Thanks in advance.
Andrew
1