Home   Help Search Login Register  

Author Topic: SetPitch?  (Read 588 times)

0 Members and 2 Guests are viewing this topic.

fri000

  • Guest
SetPitch?
« on: 12 Oct 2003, 04:27:09 »
Does anyone know if there's any possible way of setting the pitch of a missile that was created using the camCreate command?



...or maybe some other way of making the same effect? ???

m21man

  • Guest
Re:SetPitch?
« Reply #1 on: 12 Oct 2003, 06:17:15 »
I don't think this is easily done, if it can be done at all :-\ .

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:SetPitch?
« Reply #2 on: 14 Oct 2003, 19:19:19 »
Many a scripter has pondered this question before, but I don't think anyone has yet found the answer.

I haven't tried it, but maybe by using a combination of setvelocity commands in different directions, you could sort of shake the object until it faces the right direction. That or you could create an object underneath the falling object so that the falling object has to roll a bit to get off it. Wouldn't work with missles though, I suppose.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

fri000

  • Guest
Re:SetPitch?
« Reply #3 on: 15 Oct 2003, 01:16:01 »
i think i found an efficient way of doing it..

in this twisted metal type map im making im trying to get a dune buggy to shoot a missile after picking up a 'power up' type thing. Creating a missile using camCreate above the buggy and have it fly forward was fairly simple. But i ran into a problem that if the buggy is on a hill driving upward and tries to shoot the missile it will end up blowing it self up. It's obvious that the missile just flies into the hill instead of up at the same angle as the buggy.

What helped me out with this was a GetPitch/GetBank function i found on this site. It seems that if i set the missile's z velocity to the buggy's pitch the missile will fly at the right angle (although it wont be facing the way its flying, which does look a bit odd).  :P :)

m21man

  • Guest
Re:SetPitch?
« Reply #4 on: 15 Oct 2003, 01:23:19 »
Yeah, I had to this with one of my scripts for the Nightstalker Mod...The effect looks somewhat mediocre, but it's the best I can do with what's available.
« Last Edit: 15 Oct 2003, 01:28:31 by m21man »

fri000

  • Guest
Re:SetPitch?
« Reply #5 on: 15 Oct 2003, 01:31:56 »
thanks for not telling me it before :beat:

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:SetPitch?
« Reply #6 on: 15 Oct 2003, 07:03:31 »
Well, you never really specified that you really just wanted a way to make a missle travel in a certain direction. SetPitch sort of implies that you want to change the (must I say it?) pitch of an object, such as making a plane tilt it's nose downward.  ;D
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!