浏览代码

Repaint when selecting spawn location (#152)

When we wanted to click to select spawn location while not in play mode the gizmos was laggy. I added to repaint on mouse move event to always paint the exact location.
/main
GitHub 4 年前
当前提交
8a3e7f3a
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
      UOP1_Project/Assets/Scripts/ClickToPlaceHelper.cs

4
UOP1_Project/Assets/Scripts/ClickToPlaceHelper.cs


{
_spawnPosition = hit.point + Vector3.up * _verticalOffset;
if (currentGUIEvent.type == EventType.MouseMove)
{
HandleUtility.Repaint();
}
if (currentGUIEvent.type == EventType.MouseDown
&& currentGUIEvent.button == 0) // Wait for Left mouse button down
{

正在加载...
取消
保存