playMaker

Author Topic: Flight - best way to sim/emu the physics?  (Read 2540 times)

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Flight - best way to sim/emu the physics?
« on: November 20, 2016, 09:14:57 PM »
Hi guys,

1. What is the best way to make a basic flight sim model using PM? I currently have my plane being 'thrown' and gliding for a short while ending with a slow descent using the Unity built in rigidbody. but it is not reacting when pitch/banking. It just flies straight ahead.

2. How would I apply steering via VR head rotation without forward thrust? i.e.  looking down will speed up, looking up will slow down eventually stall. This is important as the plane is a non powered glider. Take off velocity will come from a slingshot.


I have tried various things and so far nothing is giving that paper plane type feel which I am going for. I have tried MoveTowards with a child look-at target. but this applies forward thrust in order to work. Maybe the Max Speed should be affected by velocity or something.

Do I need to incorporate the formula for lift in there somehow?


Thank you to anyone taking the time to read.
Peace
JG

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Flight - best way to sim/emu the physics?
« Reply #1 on: November 21, 2016, 03:08:10 AM »
Hi,

 Flight simulation is known to be extremly complex. you'll need to have extremlay sharp knowledge of forces and torques, which is the only way to control realistically a flying object.

 so pitch and bank are only a matter of forces and torques, deduced from your various moving parts of your plane on the wings and tails.

 needless to say, I strongly advice you to take an asset that already provide you with an abstracted way to control and define your plane.

https://www.assetstore.unity3d.com/en/#!/content/11321


now, to link controls witha vr headset, what'll you have to do it so get the direction of your vr headset ( using getDirection action), and use that direction as the pointing aim for your aircraft to go. For this, with some cheating you could use  some spring joints to control your aircraft by moving the target and the spring join would do the rest to animate smoothly. but that owuld be faking the flight behaviour, though could help you achieve something with a lot more predictability.

Bye,

 Jean

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Re: Flight - best way to sim/emu the physics?
« Reply #2 on: November 21, 2016, 10:43:43 AM »
Thank you for replying Jean.

As always your advice and knowledge is top notch. I think I may be biting off more than I can chew with this idea. I will give it a few more tests and scan the store again for anything I can use before moving on to plan B. =)

Thanks again.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Flight - best way to sim/emu the physics?
« Reply #3 on: November 22, 2016, 01:55:56 AM »
Hi,

 yes, it's wiser. Even advanced developers will have a hard time doing a realistic behaviour.

 your best best if you want to do something for the sake of research of gameplay, is to cheat and produce something that feels like flying but is not. This is what's great with virtual reality, you don't have to be reproducing the exact way it works, just cheat and make it so that it fits your purpose.

Bye,

 Jean