mouse slow in webgl

hi,
i have a simple scene with mouse orbit. in the editor the speed of the mouse is good, in the webgl-built it is a looot slower. did i miss some settings?

Did you multiply the input with Time.deltaTime to make it independent of the framerate?

ah, i knew something like this would happen :smile: i am no programmer, not even close to one… where do i have to do this?

Do not multiply mouse input by Time.deltaTime…mouse input is already framerate-independent, so using Time.deltaTime in this context is exactly the opposite of what you want (it makes movement dependent on framerate).

–Eric

Oh my, Eric is certainly right.

so, now i know what i shouldn’t do :wink:
any solution?

You should show your orbit code, because we don’t know what exactly you are doing.

it is the script that comes with unity. i didn’t write anything myself.

var target : Transform;
var distance = 10.0;

var xSpeed = 250.0;
var ySpeed = 120.0;

var yMinLimit = -20;
var yMaxLimit = 80;

private var x = 0.0;
private var y = 0.0;

@script AddComponentMenu(“Camera-Control/Mouse Orbit”)

function Start () {
var angles = transform.eulerAngles;
x = angles.y;
y = angles.x;

// Make the rigid body not change rotation
if (GetComponent.())
GetComponent.().freezeRotation = true;
}

function LateUpdate () {
if (target && Input.GetMouseButton(0)) {
x += Input.GetAxis(“Mouse X”) * xSpeed * 0.02;
y -= Input.GetAxis(“Mouse Y”) * ySpeed * 0.02;

y = ClampAngle(y, yMinLimit, yMaxLimit);

var rotation = Quaternion.Euler(y, x, 0);
var position = rotation * Vector3(0.0, 0.0, -distance) + target.position;

transform.rotation = rotation;
transform.position = position;
}
}

static function ClampAngle (angle : float, min : float, max : float) {
if (angle < -360)
angle += 360;
if (angle > 360)
angle -= 360;
return Mathf.Clamp (angle, min, max);
}

I have the same problem. Factor 8 to 10 in difference.

should i report it as a bug?

still the same problem (beta18). another scene and the standard fps-controller. looking aroudn with the mouse is very slow. in the editor it is ok, in the webgl-built it is around half the speed…

(firefox and chrome)