DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Event_OnDoubleClick()

SceneObject PluginBase::Event_OnDoubleClick ( )
inlineprivate

См. определение в файле PluginSceneManager.c строка 276

277 {
278 if ( !IsMouseInScene() || !m_IsOpen || m_ClassBrowserSelected == "" )
279 {
280 return null;
281 }
282
283 // Direction Vector from current active Camera
284 vector dir = GetGame().GetPointerDirection();
285
286 // Raycast from
287 vector from = FreeDebugCamera.GetInstance().GetPosition();
288 // Raycast to
289 vector to = from + ( dir * 10000 );
290 // Raycast out parameter
291 vector contact_pos;
292 vector contact_dir;
293 int contact_component;
294
295 if ( DayZPhysics.RaycastRV(from, to, contact_pos, contact_dir, contact_component) )
296 {
297 SceneObject obj = m_SceneData.CreateSceneObject(m_ClassBrowserSelected, contact_pos);
298
299 if ( obj != NULL )
300 {
301 SelectObject(obj);
302 return obj;
303 }
304 }
305
306 return NULL;
307 }
proto native vector GetPointerDirection()
Returns the direction where the mouse points, from the camera view.
static bool m_IsOpen
Определения PluginCameraTools.c:4
ref SceneData m_SceneData
Определения PluginSceneManager.c:1129
bool IsMouseInScene()
Определения PluginSceneManager.c:1227
void SelectObject(SceneObject obj)
Определения PluginSceneManager.c:474
string m_ClassBrowserSelected
Определения PluginSceneManager.c:1131
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CGame::GetPointerDirection(), IsMouseInScene(), m_ClassBrowserSelected, m_IsOpen, m_SceneData, DayZPhysics::RaycastRV() и SelectObject().