cybereality
Do you know how to actually advance the physics body by a step? In the _integrate_forces function, I essentially want to do something like this (pardon my mixed psuedocode):
predicted_path = [ ]
for (int i = 0; i < 100; i++) {
// Compute one physics step - This is what I'm unsure how to do
???
// Then add predicted path position, building a "line" of positions as the object is simulated
predicted_path.append(position);
}
// draw predicted path using Line2D - this part I have no problem with
I seem to have access to Physics2DDirectBodyState, and presumably to the physics 2d server singleton if I want.
If it makes any difference, I'm writing my project in C# -- but I've never had issues converting from GDScript help/advice to C#