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

◆ Event_OnDrag()

void PluginBase::Event_OnDrag ( )
inlineprivate

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

242 {
243 if ( !IsMouseInScene() || !m_IsOpen )
244 {
245 return;
246 }
247
248 if ( GetSelectedSceneObject() != NULL )
249 {
250 // Direction Vector from current active Camera
251 vector dir = GetGame().GetPointerDirection();
252
253 // Raycast from
254 vector from = FreeDebugCamera.GetInstance().GetPosition();
255 // Raycast to
256 vector to = from + ( dir * 10000 );
257 // Raycast out parameter
258 vector contact_pos;
259 vector contact_dir;
260 int contact_component;
261
262 //Raycast(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, out set<Object> results = NULL, Object with = NULL, Object ignore = NULL, bool sorted = false, bool ground_only = false, int iType = ObjIntersectView, float radius = 0.0);
263
264 if ( DayZPhysics.RaycastRV(from, to, contact_pos, contact_dir, contact_component, NULL, NULL, NULL, false, true) )
265 {
266 GetSelectedSceneObject().SetPosition(contact_pos);
267 }
268
269 EditorUpdate();
270 }
271 }
proto native vector GetPointerDirection()
Returns the direction where the mouse points, from the camera view.
static bool m_IsOpen
Определения PluginCameraTools.c:4
void EditorUpdate()
Определения PluginSceneManager.c:1145
bool IsMouseInScene()
Определения PluginSceneManager.c:1227
SceneObject GetSelectedSceneObject()
Определения PluginSceneManager.c:491
void SetPosition(vector pos)
Определения SceneObject.c:402
proto native CGame GetGame()

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