PDA

View Full Version : Point3d v Point2d



SoW Reddog
Feb-25-2014, 11:59
Just a quickie, I'll be able to test later if no one knows the answer.

The position reported by OnStationaryKilled for example is a Point3d. In the .mis file though the static's position doesn't appear to have any z element, so one would presume that the z portion of the Point3d is actually zero. Is that the case?

ATAG_Colander
Feb-25-2014, 12:53
Stationaries are on ground level so my guess is that the elevation axis could be the terrain height at that point or zero.

SoW Reddog
Feb-25-2014, 13:26
Stationaries are on ground level so my guess is that the elevation axis could be the terrain height at that point or zero.

My fear is that it's the terrain height. If it is then I'm a bit stuffed, but we shall see shortly when I can get on my desktop and test it out.

Sods
Feb-25-2014, 15:45
My fear is that it's the terrain height. If it is then I'm a bit stuffed, but we shall see shortly when I can get on my desktop and test it out.

2d doesn't matter about the height, but 3d does. So if you want to only destroy targets in a given radius above 1 meter then use 3d. if you want to destroy everything in the radius use 2d

ATAG_Colander
Feb-25-2014, 16:01
I think he's trying to dynamically spawn statics and he might be in trouble if the terrain height is needed.

SoW Reddog
Feb-25-2014, 16:02
As I feared, the position returned is 3d, not 2d and indeed the z position is not zero. I believe it's the terrain height...

Bummer. Will have to convert all 3d's to 2d's which is a bit of a pain. Never mind.

SoW Reddog
Feb-25-2014, 16:04
I think he's trying to dynamically spawn statics and he might be in trouble if the terrain height is needed.

Not quite. I'm trying to parse the statics and buildings from the mission file into a dictionary, that I can then compare to the positions of statics and buildings destroyed. One's 2d, the others 3d which is a problem. Not however an insurmountable problem thankfully.