playMaker

Author Topic: Local Physic Scene 'Trajectory and Shoot' (New Unity Physic 2018.3+)  (Read 247 times)

kaniballo

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
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 :)
« Last Edit: June 09, 2019, 07:51:59 AM by kaniballo »

cel

  • Junior Playmaker
  • **
  • Posts: 91
    • View Profile
Re: Local Physic Scene 'Trajectory and Shoot' (New Unity Physic 2018.3+)
« Reply #1 on: June 09, 2019, 11:31:03 AM »
thanks for your help, but im totally lost here on how to use it... maybe you could provide a little example?

kaniballo

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Local Physic Scene 'Trajectory and Shoot' (New Unity Physic 2018.3+)
« Reply #2 on: June 09, 2019, 02:09:02 PM »
,... at what part you are confused ,... for what type of gameplay you may use two or more physical scenes ,... or princip how to build collision objects for simulation environment,... shoot or throw object etc,... say little more :)

cel

  • Junior Playmaker
  • **
  • Posts: 91
    • View Profile
Re: Local Physic Scene 'Trajectory and Shoot' (New Unity Physic 2018.3+)
« Reply #3 on: June 09, 2019, 02:28:56 PM »
I mean do we still need to use the other actions (create physics scene and simulate?) And what is the "action section go on simulation"... it would be much easier if you could share an example of the actions so we could see the proper setup