Hey I would like to use the blender game engine to predict the trajectory of a ping pong ball in real time. But to do this I need blender to run the blender game engine 500x normal speed but still with precise physics. I see that in Blender Render mode it is possible to change the time constant and therefore speed up the simulation but I need the game engine mode so that I may use python scripting to add objects and for serial communication so I must use the game engine. Is there a way around this?
Unless you going to have mid air collisions, the trajector is very simple to predict, using calculus. Something like this:
predict.blend (552 KB)
However, I did notice that explicit euler integration wasn’t as precise as suvat, but also that the gravity doesn’t seem right.
wow thankyou so much! This was amazing, much better that what I was expecting. I tried to look at the code and I understand most of it but had a couple concerns and questions. Please pardon my lack of knowledge. Can I continue to use Suvat physics to predict a bounce on a mid plane or are there other types of physics equations for this? (Sorry I will be taking physics this upcoming year) Next if the scene continues to get populated with lines it lags quite a bit so can I remove them from the post draw list to remove the lag? The gravity did seem to be off I tried playing with it but if I can get bouncing working I can just fiddle with it to get a workable prediction
The only tricky issue with this approach is that it doesn’t give the ball any size. If you are using this for a ping-pong table, which is flat, then you can use a trick to get the correct hit position, otherwise, you would need to basically write a collision solver / spawn a new blender instance which can report back with what happened.
predict.blend (683 KB)
WOW you are amazing! I’m checking it out now absolutely fantastic you are a god!