Replies: 3 comments 3 replies
-
I think your approach is not bad, but without seeing the code it is difficult to say why it doesn't work. When I implemented similar functionality long ago I decided to use Qt for the animation, based on QAbstractAnimation, QEasingCurve and QStateMachine. Then use SbRotation::slerp() to interpolate orientation, and I interpolated the position manually. Not sure why I didn't use SoInterpolate. Edit: I think the reason for not using SoInterpolate was that if you want to rotate the camera around an object you want the camera to travel over a circular arc, not a straight line. |
Beta Was this translation helpful? Give feedback.
-
I think, I have found, what I need: An SoTimerSensor. It sais in the description: "commonly used to trigger animation updates at a constant frame rate" Pretty much exactly what I was looking for. |
Beta Was this translation helpful? Give feedback.
-
@harzner You may have a look onto |
Beta Was this translation helpful? Give feedback.
-
Hi peeps,
I have a question about the interaction of Cameras, Events, and Engines...
Let's say that I have two objects in the scene graph right next to each other, and the Camera is looking at the left object.
What I'm looking for is a solution for a camera-animation to "slide" from the left object to the right, triggered by a click on the RIGHT_ARROW key.
I am struggling to find a way to make a Camera move "swiftly" between stationary objects... triggered by a KEY
So far I understand that a camera can get a position without a translation node, it can look at things, but what I just can't get to work is a swift movement of the camera over time, in relation to some pretty stationary objects.
Any hints? I would be grateful!
I tried to use a SoOneShot Engine to be triggered by the key-event, then use the "ramp" to send that to an SoInterpolation, between the cameras current position, and its desitination, but that didn't work out.
I'm honestly quite lost... any ideas?
Thanks, and kind regards,
Harzner
Beta Was this translation helpful? Give feedback.
All reactions