Home   Help Search Login Register  

Author Topic: GetDir isn't doing what it should!  (Read 661 times)

0 Members and 1 Guest are viewing this topic.

tech-head

  • Guest
GetDir isn't doing what it should!
« on: 31 Jan 2003, 00:13:31 »
Is there a way to examine the heading on the compass, other than using the GetDir command? Although turning the player from left to right adjusts the Compass... it doesn't change the GetDir heading immediately. This is due to the fact that there is a degree of freedom from left to right before the actual heading is changed. (The torso moves before the whole player)

If you think I'm insane... try it for youself!!! Aim at a target and move slightly from left to right... you'll notice that the GetDir heading doesn't change although the Compass heading does!

Another way of putting this... is there a way to trap the heading of your gun sight or binocular crosshairs?

Cheers
Tech-Head

Pandoz

  • Guest
Re:GetDir isn't doing what it should!
« Reply #1 on: 31 Jan 2003, 05:39:38 »
errr well u can use the free look thing by hitting . or * when in game? but i dont know if u can do that with cutscenes and such

tech-head

  • Guest
Re:GetDir isn't doing what it should!
« Reply #2 on: 31 Jan 2003, 14:35:25 »
But I need to know the exact heading that a non AI player is looking at... GetDir returns only the heading of the lower half of the unit... not the torso and more importantly the gun sight or binoculars.

Axo

  • Guest
Re:GetDir isn't doing what it should!
« Reply #3 on: 31 Jan 2003, 18:07:07 »
You can calculate the heading of the sight/binocular by solving the triangle between the sight object (I forgot the name), the player, and the point where a line from the player to the north intersects the edge of the map. I think this will only work while the sights/binocular are on.

tech-head

  • Guest
Re:GetDir isn't doing what it should!
« Reply #4 on: 31 Jan 2003, 23:33:55 »
There isn't a target object... I've written a script which Triangulates the location that two players are looking at... converts all the angles to X,Y coordinates and drops a cluster of bombs where the two lines meet. I can't reference the target by name cause I'm not interested in what's there... I just want to drop bombs where ever both players are looking at. The whole thing works but without a more accurate method of detecting the current heading... it's too inacurate. If anyone is interested, I'll post the script.
« Last Edit: 01 Feb 2003, 01:44:31 by tech-head »