Jump to content
Nicoman35

How to get position coordinates in tactical / 3. person view?

Recommended Posts

I would like to get the position coordinates of the cursor in tactical / 3. person view.

getMousePosition does not work, as the cursor is not the mouse pointer.

And I don't know how to get the variable _pos with cursorOnGround working.

Any advice?

Share this post


Link to post
Share on other sites

Perhaps something like:

private _pos = ((lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,5000],player,objNull,true,1,"VIEW","NONE"])#0#0);

Share this post


Link to post
Share on other sites

Thanks for suggestion, pierremgi. Just testing this:

arrow = "Sign_Arrow_F" createVehicle [0,0,0];
onEachFrame {
	_pos = lineIntersectsSurfaces [
		AGLToASL positionCameraToWorld [0,0,0], 
		AGLToASL positionCameraToWorld [0,0,5000], 
		player,
		objNull,
		true,
		1,
		"VIEW",
		"NONE"
	];
	if (count _pos == 0) exitWith {arrow setPosASL [0,0,0]};
	arrow setPosASL (_pos #0 #0);
	arrow setVectorUp (_pos #0 #1);
	hintSilent str _pos;
};

Works good for 3. person, but in tactical view, I still do not get the cursor position. Any idea how to get cursor pos in tactical view?

Share this post


Link to post
Share on other sites

You might be able to get that by creating a fullscreen control when tac view is opened and using one of the mouse events with that control. :shrug:
Tac view has no display so getMousePosition and the mouse events seem to return the mouse coords in front of the player in 1st person view even though the camera is high above..

Share this post


Link to post
Share on other sites

Meh. Does not work. At least I do not get it working. Oh well. Many thanks for the help anyway guys 🙂

Share this post


Link to post
Share on other sites

There's always the possibility to request a new scripting command at the FT to retrieve the cursor pos with, if stars happen to align perfectly it might be added.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×