cursorObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - ">Posted on March ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-03-$1")
 
(38 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


|arma3|Game name=
|game1= arma3
|version1= 1.56


|1.56|Game version=
|gr1= Object Detection


|gr1= Object Detection |GROUP1=
|descr= Returns the object under cursor. This command is quite different from [[cursorTarget]] as it is more precise in determining the boundaries of the pointed at object and can detect a larger variety of objects including map objects and trees.
____________________________________________________________________________________________


| Returns the object under cursor. This command is quite different from [[cursorTarget]] as it is more precise in determining the boundaries of the pointed at object and can detect a larger variety of objects including map objects and trees. |DESCRIPTION=
|s1= '''cursorObject'''
____________________________________________________________________________________________


| '''cursorObject''' |SYNTAX=
|r1= [[Object]]


| [[Object]] |RETURNVALUE=
|x1= <sqf>hint str [getModelInfo cursorObject, typeOf cursorObject];</sqf>


 
|seealso= [[getCursorObjectParams]] [[cursorTarget]] [[lineIntersects]] [[lineIntersectsWith]] [[lineIntersectsObjs]] [[lineIntersectsSurfaces]] [[intersect]] [[checkVisibility]]
|x1= <code>[[hint]] [[str]] [<nowiki/>[[getModelInfo]] [[cursorObject]], [[typeOf]] [[cursorObject]]];</code>|EXAMPLE1=
 
____________________________________________________________________________________________
 
| [[getCursorObjectParams]], [[cursorTarget]], [[lineIntersects]], [[lineIntersectsWith]], [[lineIntersectsObjs]], [[lineIntersectsSurfaces]], [[intersect]], [[checkVisibility]]|SEEALSO=
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}


<h3 style='display:none'>Notes</h3>
<dl class="command_description">
<dl class='command_description'>
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on March 23, 2015 - 18:17 (UTC)
<dt><dt>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]
<dd class="notedate">Posted on 2015-03-23 - 18:17 (UTC)</dd>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dd class="note">
<dd class="note">
If you point at the primary weapon of an infantry unit, cursorObject will return the p3d of the weapon instead of  the unit itself (B Alpha 1-2:1.. or its variable name ). That doesn't occur for anything else (backpack or headgear).
If you point at the primary weapon of an infantry unit, cursorObject will return the p3d of the weapon instead of  the unit itself (B Alpha 1-2:1.. or its variable name ). That doesn't occur for anything else (backpack or headgear).


<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 30, 2020 - 14:30 (UTC)</dd>
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
<dd class="note">
Some large buildings aren't found by this command. "Land_Airport_Tower_F" and "Land_Offices_01_V1_F" are two examples.
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 23:06, 13 May 2023

Hover & click on the images for description

Description

Description:
Returns the object under cursor. This command is quite different from cursorTarget as it is more precise in determining the boundaries of the pointed at object and can detect a larger variety of objects including map objects and trees.
Groups:
Object Detection

Syntax

Syntax:
cursorObject
Return Value:
Object

Examples

Example 1:
hint str [getModelInfo cursorObject, typeOf cursorObject];

Additional Information

See also:
getCursorObjectParams cursorTarget lineIntersects lineIntersectsWith lineIntersectsObjs lineIntersectsSurfaces intersect checkVisibility

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on 2015-03-23 - 18:17 (UTC)
Pierre MGI
If you point at the primary weapon of an infantry unit, cursorObject will return the p3d of the weapon instead of the unit itself (B Alpha 1-2:1.. or its variable name ). That doesn't occur for anything else (backpack or headgear).