Home   Help Search Login Register  

Author Topic: Tilt and roll?  (Read 971 times)

0 Members and 1 Guest are viewing this topic.

Offline the corinthian

  • Members
  • *
  • I'm a llama!
Tilt and roll?
« on: 06 Jul 2007, 16:31:18 »
Hi

In a mission I am developing there is a section where the players are in a heli which then  gets hit and is forced to crash. I tried using the standard setdammage 0.8 on the heli which forces it down but this is quite random, sometimes it gains height and other times it just seems to glide down. I have bastardized a script from OFP that simulated tailrotor failure and this uses the getdir, setdir and setvelocity functions.

Once thing i have noticed though is that if my heli is tilted forwards or banking left or right then when the setpos and setvelocity commands are issued the heli seems to magically level out. Is there a similar function that determines the bank/roll or tilt etc so I can stop the heli suddenly levelling out as soon as the script is called?

Cheers

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Tilt and roll?
« Reply #1 on: 06 Jul 2007, 18:25:13 »
setDir breaks completely the physics (it adjust vectorUP) but setVectorDir doesnt. Try using setVectorDir instead of setDir and leave vectorUp untouched.