"Predicting Physics"

This may be a strange question (and the answer might be “impossible”), but I thought I’ll try anyway.

Im doing an Archery game using the Unity Physics engine (basically adding force to a direction, and other things)…and was wondering if there was some way in “predicting” where it would end up. Basically so I could check if they beat the level or not (before it actually happens).

So I’ve tried attaching a “trigger” of sorts to the front of it (and if it collides with the target = you win), but it doesnt work all the time (the slower, more angled shots). Then I thought about shooting an invisible arrow at twice the speed (and twice as heavy), but the logic behind that way is flawed (since it goes at the same speed, I tried messing around with the other values, like Drag and stuff, but I really dont know how I should change it).

So is there any way to “predict” where a physics object is going to end up?

Thanks

This isn’t possible with the physics engine, but it is possible to calculate the path of the arrow (approximately) and move it directly from your own code. There’s a simple trajectory script in this thread that might help you if you want to try this approach.

What about this from the game Splume?

In Splume you can see the balls trajectory before you fire it and I’m assuming that is the script that does it.

It is certainly possible to use your own calculations to estimate a trajectory plotted by the physics engine. However, the physics is a live simulation rather than a pre-calculated thing, so there isn’t a way to get a perfect estimate from the engine.