Ok, basically what I want to do is create a marker on each corner of a building at any angle. This is very advance for me because it involves alot of sin,cos,tan calculations.
This is what I have so far:
---------------------------------------------------------------------------------------------------------
_dir = getdir building01;
_posx01 = ((position building01 select 0) + (5*(sin _dir)) + (5*(cos _dir)));
_posy01 = ((position building01 select 1) + (5*(cos _dir)) - (5*(sin _dir)));
_temp01 = createMarkerLocal [(format ["%1%2","Marker01",0]),[_posx01,_posy01]];
_temp01 setMarkerShapeLocal "ICON";
_posx02 = ((position building01 select 0) + (5*(sin _dir)) - (5*(cos _dir)));
_posy02 = ((position building01 select 1) + (5*(cos _dir)) + (5*(sin _dir)));
_temp02 = createMarkerLocal [(format ["%1%2","Marker02",1]),[_posx02,_posy02]];
_temp02 setMarkerShapeLocal "ICON";
_posx03 = ((position building01 select 0) - (5*(sin _dir)) + (5*(cos _dir)));
_posy03 = ((position building01 select 1) - (5*(cos _dir)) - (5*(sin _dir)));
_temp03 = createMarkerLocal [(format ["%1%2","Marker03",2]),[_posx03,_posy03]];
_temp03 setMarkerShapeLocal "ICON";
_posx04 = ((position building01 select 0) - (5*(sin _dir)) - (5*(cos _dir)));
_posy04 = ((position building01 select 1) - (5*(cos _dir)) + (5*(sin _dir)));
_temp04 = createMarkerLocal [(format ["%1%2","Marker04",3]),[_posx04,_posy04]];
_temp04 setMarkerShapeLocal "ICON";
---------------------------------------------------------------------------------------------------------
The 5's in the script is the size of the building. (this will vary)
Just keep in mind that this markers must be created dependend on the angle of the building.
The "x" is where I want the markers to be...
x x
l---------l
l l
l l
l l
l---------l
x x
If the building is rotates at any angle:
x x
/----------/
/ /
/ /
/ /
/----------/
x x
You probable need a very good math mark for this(I wish I did).
Please help.
thx in advance
L!nk