In editor, we can select any actor by left mouse click, even if the collision of selected actor is set to disabled. Apparently editor doesn’t use “LineTraceByXxx” to detect which actor is selected.
My question is: Which API editor use to select actor? Can this API be used by game logic?
I’m new to unreal and never read the UE source code. I have no idea which file I can find this answer by myself. It will be nice if you could tell me where I can find!!!
Thanks for your detailed answer!! That’s help a lot!
I also wonder how editor know which actors is considered selected when left mouse button is clicked?
Generally, in game logic we will project the location of cursor to world space (FVector Start, FVector End) and then use LineTraceByChannel to find which actors is under cursor when clicking. This solution require the collision of actors is enabled.
However, we can select collision-disabled actors in editor by left mouse button. How editor achieve? What happen between “clicking on level editor” and “actors is marked selected”?