Hi all, here is one action from new Unity local physic scene mode,... It take mouse click and show trajectory, on second click trajectory gone and some GameObject fire at position where was clicked,...
What is new here - it's create paralel (added in hierarchy) local physic scene on load doing trajectory simulation on this scene - stop simulation after done - and result fire GO. On main/default scene you must duplicate collision objects ,..example floor and wall (2 boxes with collider) - duplicate and put in action section 'go in simulation' - where they will go in Local Scene,.... The force is Add.Force Impulse - i.e you may control with ammo Rigidbody mass (little mass and small scale more fast object move,... and opposite). You have multiplier "force" who control speed on ammo too,... Ray Length for little optimisation,... and trajectory count - is most expansive - create samples where ammo/cannonball should go 100 is good start for little less trajectory - 300/500 for more long complex one,... i'm 'green inside' in programing ,.. so no clean code may be done - if someone can provide optimisation pls do it