public static GetWorldRayFromScreenPoint ( |
||
screenPoint | ||
raySrc | ||
rayDir | ||
return | void |
public bool GetVirtualPos(out Vec3 pos) { Vec3 raySrc; Vec3 rayDir; Editor.GetWorldRayFromScreenPoint(Editor.Viewport.NormalizedMousePos, out raySrc, out rayDir); if (!this.m_virtualPlane.RayIntersect(raySrc, rayDir, out pos)) { return(false); } switch (this.m_axisConstraint) { case Axis.X: pos = Vec3.Dot(pos, this.m_virtualPlaneBase.axisX) * this.m_virtualPlaneBase.axisX; break; case Axis.Y: pos = Vec3.Dot(pos, this.m_virtualPlaneBase.axisY) * this.m_virtualPlaneBase.axisY; break; case Axis.Z: pos = Vec3.Dot(pos, this.m_virtualPlaneBase.axisZ) * this.m_virtualPlaneBase.axisZ; break; } return(true); }
public static bool RayCastPhysicsFromScreenPoint(Vec2 screenPoint, out Vec3 hitPos) { Vec3 raySrc; Vec3 rayDir; Editor.GetWorldRayFromScreenPoint(screenPoint, out raySrc, out rayDir); float num; return(Editor.RayCastPhysics(raySrc, rayDir, EditorObject.Null, out hitPos, out num)); }
public static bool RayCastTerrainFromScreenPoint(Vec2 screenPoint, out Vec3 hitPos) { Vec3 raySrc; Vec3 rayDir; Editor.GetWorldRayFromScreenPoint(screenPoint, out raySrc, out rayDir); float num; return(Editor.RayCastTerrain(raySrc, rayDir, out hitPos, out num)); }