I can see how this would be a useful function to have access to, for physics libs. Also, for people who move entities by setting their position but not storing it... why store it twice?
But if an entity collides with something, would the speed be reduced? The entity didn't move as far. But if an entity does collide with something in a physics simulation, you usually don't want to slow it down... unless you're dealing with verlet physics. You want it to rebound at the same speed it was traveling originally. So you'll still need to remmeber how fast it was going.
So it doesn't seem so useful after all. Also keep in mind that though one does not have access to the variables the user stores the velocity in in their physics lib, one does have access to the position, and one can store that position in the physics lib with the entity pointer. So this funciton is not neccessary to be able to calculate that information in a physics lib easily, unless you're trying to make a lib where you have to pass the entity you want updated to it every frame, and that doesn't seem like a good way to do it.
Perhaps it doesn't seem that useful to me after all.
But if an entity collides with something, would the speed be reduced? The entity didn't move as far. But if an entity does collide with something in a physics simulation, you usually don't want to slow it down... unless you're dealing with verlet physics. You want it to rebound at the same speed it was traveling originally. So you'll still need to remmeber how fast it was going.
So it doesn't seem so useful after all. Also keep in mind that though one does not have access to the variables the user stores the velocity in in their physics lib, one does have access to the position, and one can store that position in the physics lib with the entity pointer. So this funciton is not neccessary to be able to calculate that information in a physics lib easily, unless you're trying to make a lib where you have to pass the entity you want updated to it every frame, and that doesn't seem like a good way to do it.
Perhaps it doesn't seem that useful to me after all.