SFML community forums

General => General discussions => Topic started by: unlight on September 12, 2019, 05:51:17 am

Title: Movement Scripting
Post by: unlight on September 12, 2019, 05:51:17 am
Hi guys,

Just wanted to start a general conversation about how you have implemented movement scripting in your games, i.e. how do you define a path for an entity to follow. Has anyone implemented this in a generic way?

I recently created a class called Trajectory, which allows you to add time-stamped position/rotation points, then a getter function that returns interpolated position/rotations based on an input time value.

This works well enough for my use case, but I can imagine better solutions exist for motion that ought to be smoothed using splines or something like that.