Event.delta in the editor is move speed but in the webplayer is equal Event.mousePosition Why?![]()
Can you post the code that is showing this behaviour?
var delta = 0.0;
var mpos = 0.0;
function OnGUI ()
{
if(Event.current.type==EventType.MouseDrag)
{
delta = Event.current.delta.x;
mpos = Event.current.mousePosition.x;
}
GUILayout.Box("delta.x:"+delta+"");
GUILayout.Box("mousePos:"+mpos);
}
Iβm having the same problem. I created this elaborate in-game editor relying on mouse dragging and Event.delta, and I just tried it in the web player, and itβs completely unusable. I added debug logging and confirmed that Event.delta is the mouse position.
I confirm that Event.delta is unusable due to a bug.
Also: Event.mousePosition should be in pixels but in reallity may have same fancy 130.5 pixels coordinates, and when Event.type == EventMouseDown , Event.mousePosition is wrong with delta ~ 1-1.5 pixels.
Bump. Still not fixed ![]()
This is still an issue in 3.3.0f4