cursorObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Removed note)
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


|arma3|Game name=
|arma3|Game name=
Line 7: Line 6:


|gr1= Object Detection |GROUP1=
|gr1= Object Detection |GROUP1=
____________________________________________________________________________________________


| 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=
| 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=
____________________________________________________________________________________________


| '''cursorObject''' |SYNTAX=
| '''cursorObject''' |SYNTAX=
Line 19: Line 16:
|x1= <code>[[hint]] [[str]] [<nowiki/>[[getModelInfo]] [[cursorObject]], [[typeOf]] [[cursorObject]]];</code>|EXAMPLE1=  
|x1= <code>[[hint]] [[str]] [<nowiki/>[[getModelInfo]] [[cursorObject]], [[typeOf]] [[cursorObject]]];</code>|EXAMPLE1=  


____________________________________________________________________________________________


| [[getCursorObjectParams]], [[cursorTarget]], [[lineIntersects]], [[lineIntersectsWith]], [[lineIntersectsObjs]], [[lineIntersectsSurfaces]], [[intersect]], [[checkVisibility]]|SEEALSO=  
| [[getCursorObjectParams]], [[cursorTarget]], [[lineIntersects]], [[lineIntersectsWith]], [[lineIntersectsObjs]], [[lineIntersectsSurfaces]], [[intersect]], [[checkVisibility]]|SEEALSO=  


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
}}
}}



Revision as of 01:42, 17 January 2021

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:
getCursorObjectParamscursorTargetlineIntersectslineIntersectsWithlineIntersectsObjslineIntersectsSurfacesintersectcheckVisibility

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

Notes

Posted on March 23, 2015 - 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).

Bottom Section