Page MenuHomeFeedback Tracker

The command selectionPosition searches only in Memory LOD
New, WishlistPublic

Description

The command selectionPosition should return positions of selections in the model.

On the wiki, it says:
Search for selection in the object model (first in the memory level, then in geometry LODs)

Which is not the case. Anyway, even if this never was the case it sould be expandet to search in all relevant LODs like:

  1. memory LOD
  2. hitpoints LOD
  3. geometry LOD
  4. resolution LODs

Why?
I can make a example with doors:

So on the average building in arma 3 there are doors and you want to get the position of these doors in render time scope you need selectionPosition, each door has named selections in the memory lod (door_x_trigger,door_handle_x_axis and door_x_axis). Now when the door is animated, normaly you have one selection that is animated with it (door_handle_x_axis) and the axis the door is animated around (door_x_axis), so you could get the center of the door between those two points. But there are three problems with it:

  1. door_handle_x_axis is always ~ 2° +/- to the door
  2. even on the same building the 2° offset is randomly in or outside the door
  3. doors with no animated door handler have no door_handle_x_axis memorypoint so no animated selection on those doors.

Now when you look at the geometry lod, there is a selection called door_x which is the whole door that gets animated.
Sadly there is no way to get selection position from door_x since it is not in the memory lod.

This is just one of a lot examples where selectionPosition would be usfull with other LODs.

Details

Legacy ID
3381955818
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

myHouse = cursorTarget;
selectionPosMemory = myHouse selectionPosition "door_handle_1_axis";
selectionPosGeometry = myHouse selectionPosition "door_1";
hintSilent format["memory: %1 geometry: %2",selectionPosMemory,selectionPosGeometry];

output: memory:[1,2,3] geometry:[0,0,0]
but both selections exists in the model...

Event Timeline

Lappihuan edited Additional Information. (Show Details)
Lappihuan set Category to Scripting.
Lappihuan set Reproducibility to Always.
Lappihuan set Severity to None.
Lappihuan set Resolution to Open.
Lappihuan set Legacy ID to 3381955818.May 7 2016, 8:02 PM