<div dir="auto">Andreas, I read through this, and I suggest a LineSegmentInterpolator that animates a line segment. One can also interpolate between curves, surfaces and Text strings/fonts through interpolation (morphing or displacement).</div><div dir="auto"><br></div><div dir="auto">In general, perhaps these are called transitions.</div><div dir="auto"><br></div><div dir="auto"><b>Perhaps one could use two interpolators, one for the previous positions and one for the new positions. I don’t know how two interpolators can adjust the same object though.</b></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2024 at 2:19 PM Andreas Plesch via x3d-public <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">An idea for enhancement:<br>
<br>
I had a need for a PositionInterpolator to animate an object (say a<br>
ship). While moving the object around it should align its orientation<br>
with the direction of travel (bow pointing forward) which is often the<br>
case. Rather than precomputing key values for an<br>
OrientationInterpolator to go along with the interpolated positions, I<br>
decided to derive the orientations from the change in positions<br>
dynamically. Perhaps not surprisingly, this required a script. Is<br>
there an existing alternative ? Perhaps via physics ?<br>
<br>
The script takes a new position, calculates the direction of travel as<br>
the difference between the new position, and the last position (which<br>
it remembers), and uses a default SAI function to compute the rotation<br>
from the default (0,0,-1) orientation to the new direction. This<br>
sounds pretty straightforward but becomes more complicated for a<br>
GeoPositionInterpolator.<br>
<br>
Since aligning orientation with direction of travel is a frequent use<br>
case - including for animated Viewpoints - , the enhancement would be<br>
for nodes such as position interpolators, chasers and dampers, etc. to<br>
provide this orientation directly, perhaps as an additional<br>
orientation_changed event.<br>
<br>
An alternative may be use of a TransformSensor which could<br>
additionally provide this information, say as a direction_changed<br>
event.<br>
<br>
This may be outside the scope of standard X3D since it may be seen as<br>
a use case for a Script node but is so generally useful that it may<br>
warrant enhancement of existing nodes.<br>
<br>
Thanks for reading and any thoughts or criticism,<br>
<br>
Andreas<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>