Hi,
I would like to ask for any ideas or advice on the following.
I’ve made a parglider game, see sample video: [3dparaglider 2014 update - all levels quick test - YouTube][1]
With real paragliders if you pull both steering lines then the glider will stall/flair, and a cause a small forwards rotation.
At the moment I’m trying to get a stall flair added by script, see code:
function FixedUpdate () {
if(sisdown==1 && pitchk>=-4){pitchk=pitchk-0.1; transform.rotation=Quaternion.Euler(Vector3(pitchk,0,0));}
if(sisdown==0 && pitchk<=0){pitchk=pitchk+0.1; transform.rotation=Quaternion.Euler(Vector3(pitchk,0,0));}
}
Of course I have a fairly complex set of children objects and scripts attached to this paraglider object to control it, but the main part is that I have a hinge on the parent and I can control left or right with scripts and gravity etc etc
Currently I am try to rotate the whole parent object at the stall/flair…
The code above actually works but if I let go of the S key gravity seems to go very high (something like value 844) and my paraglider gameobject goes up via Y axis very quickly… if I omit this code then my game works perfectly… why is gravity seemingly affected or the object going up quickly?
I realise that I might not be giving a lot of info but any pointers would be welcome.
Or am I approching the rotaion in the wrong way, should I try to add another sprung hinge in the X axis /foward direction, and add force to that?