Trajectory2 1.2 - by Bob Le Gob ******************************* This plugin is based on the official Trajectory 2.1 plugin. It uses the same documentation than the original plugin. Versions history **************** v1.0: - Fixes the bug on interpolated rotations (with objects turning on themselves in the opposite "direction" to the one that would have been expected - anti-clockwise instead of clockwise for example). v1.1: - Optimizes the fix in v1.0, not calculating the proper orientation at each rendering, but determining these orientations only once when the plugin starts - thus sparing a good amount of CPU resources. - Fixes the way the end of a trajectory is handled. This hinders the plugin to move beyond the maximum number of frames, and provides a smoother move between loops. - Fixes the way the frame events were triggered. Frame event 0 can now be triggered, more than one event can now be triggered during a single interpolated jump and the plugin no more checks out of range event values (beyond the current frame or greater than the size of the trajectory). v1.2: - Fixes the non operational srvAutoStart feature. - Optimizes some parts of the code. Current actions handling ************************ A triggered action doesn't really interrupt a running trajectory but it updates its status: - playonce or playonceS: starts a trajectory if it's not running. If it's running, it will stop at the end (even if it was a playloop one). - playloop or playloopS: starts a looping trajectory if it's not running. If it's running, it will start again at the end as a looping trajectory (even if it was a playonce one). - playstop or playstopS: pauses a running trajectory. Triggering a playonce or playloop action will resume the trajectory with the proper looping feature. Current srvAutoStart behaviour ****************************** - a triggered playonceS will trigger local playonce actions by new clients only during a period equal to the time needed to run the trajectory. After this period, nothing will be triggered except if the client has some local autostart enabled. - Multiple triggered playonceS reset the period and thus may increase the total time for triggering the first playonceS. - playloopS and stopS actions destroy an existing period, starting a looping trajectory by the client or hindering it to run its local autostarted trajectory. Demos ***** There are 5 demos (cf 'demos' sub-directory) that use the standard graphic libs: - traj2.dms & traj2rev.dms: showing a dog turning around a room with proper orientations. - traj2stp.dms: showing the dog stopping properly at the last position (last position is not the same than the first one in this demo). - traj2evt.dms: showing the result of the events optimization. The dog moves quicklier to ensure that multiple events can be triggered during a single interpolated jump. - traj2aas.dms: showing the implementation of the srvAutoStart feature. Further debugging, optimizations and functionalities **************************************************** Some questions are still there, like: - Should an action interrupt a running trajectory ? - Should a trajectory get back to the first position at the end ? - Should non interpolated trajectories trigger frame events ? - Should there be a smooth move for the whole trajectory ? (with the number of frames between two positions depending on the distance separating them) The first two questions may probably be implemented in this module, modifying the Editor part too. The third one could be implemented too but the current mecanism doesn't take into account any progress between positions, only instant jumps. The fourth is more complex and may require either a bigger plugin, or a new specific one. Having a smooth move is an interesting idea, not having it allows to create visual effects (like speeding up or down). Any problem should be reported to: bob.le.gob@wanadoo.fr or as a post on the Scolring web site. Suggestions too :)