Jump to content
Sign in to follow this  
borg117

Getting gun reticle's position in ArmA 2

Recommended Posts

Have searched the comref and can only find cursorTarget and laserTarget which are useful, but cursorTarget only returns and unit and not any position.

i basically want the 'reticle version' of laserTarget, so for example if i click a menu item (triggering an expression/command) or a action, i have some way of getting the exact position the player is pointing towards, but of course without a laser, just the normal gun aim. I KNOW it is possible because i remember SOM when used in op harvest red (and probably standalone SOM too) comes up with a circle with a cross in the middle and you can select transport and the pos will be transmitted.

I have acutally examined those BI missions including the functions that drive SOM and I can't seem to see any reference to how position is captured so i'm taking a guess that maybe it is to do with the menu, with a menu i have i know a little hand appears where you are looking at.

If anyone knows how i might capture the position that would be great.

(btw i know about screenToWorld, vice versa, and onmapsingleclick, all great, but not what i need for a return of that sacred position.)

Share this post


Link to post
Share on other sites

Doesn't screenToWorld [0.5,0.5] give you the coordinates?

EDIT: Ah... just realised if you are using the Aiming Deadzone (I'm not)...that won't work.

Edited by twirly

Share this post


Link to post
Share on other sites
...

If anyone knows how i might capture the position that would be great.

...

you might be in luck with the latest beta (aimPos and eyePos no wiki articles yet)

Share this post


Link to post
Share on other sites

In the 1.61 beta you can use weaponDirection in combination with terrainIntersect

http://community.bistudio.com/wiki/weaponDirection

http://community.bistudio.com/wiki/terrainIntersect

In the regular version, you only have weaponDirection available. The actual position would have to be traced via script.

Perhaps you can tell us what you need it for. There might be a different solution.

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
Sign in to follow this  

×