Home   Help Search Login Register  

Author Topic: What do I change to stop this thing from always facing north??  (Read 1046 times)

0 Members and 1 Guest are viewing this topic.

Offline SizzlePants

  • Members
  • *
Harrier spawns & does what its supposed to ... just always spawns facing north.

westgrpair = createGroup west;
   _wp = westgrpair addWaypoint [getPos AV8Move, 0];
   _wp setWaypointType "HOLD";

   AV8b = createVehicle ["AV8b", [0,90,0], ["AV8Spawn1","AV8Spawn2","AV8Spawn3"], 0, "FLY"];
   "SoldierWCrew" createUnit [[0,0,20], westgrpair, "this setBehaviour ""CARELESS""; Pilot = this; this removeWeapon ""NVGoggles""; this setDir 90; this MoveInDriver AV8b", 0.6, "private"];
   AV8b setDir 90;
   Pilot setDir 90;
   AV8b flyInHeight 600;

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
You can try add more that 90 as starting direction....

Code: [Select]
AV8b setDir +135
Or place a random object in the map somewhere and use it as your referrance....

Code: [Select]
AV8b setdir getdir object +180
You can add + or - to the radius, keep working on it until you have the plane facing the correct direction.

Hope that helps~
just setpos & forgetpos!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
LOL this is interesing, the case where you spawn planes already flying. They are already flying at speed to the North, so you cannot simply use setDir. SetDir will make them face anyother direction for a second but the plane will keep flying to the North, so you'll see the plane flying backwards if you setDir to 180 and the plane will correct its direction to the moving direction, so it will tend to move its nose again to the North. In fact, if you setDir it, you'll broke all the flying physics of the plane unit it aligns its body again with its velocity vector.

So you need both, setDir but also setVelocity commands so the plane really moves to the new direction after being spawned.