Question by
PepticPaladin · May 23, 2019 at 04:50 AM ·
dragcustom editorcustom-inspectorscene view
Disable drag effects in scene view
I want to set up a grid of points that a player object can move between. I have a custom inspector that can add and remove points by clicking, and I wanted to be able to link 2 of the points together by dragging from one to the other. The problem is dragging just moves the camera, moves the selected game object, or makes a selection box. Can I disable these drag effects?
This is the dragging code that I'd like to use:
if (e.type == EventType.MouseDrag && e.button == 0)
{
if (Physics.Raycast(worldRay, out hitInfo))
{
linkPos2 = hitInfo.transform.position + offset;
}
}
Comment
Your answer