WEb Player doesn't seem to be compiling scripts correctly

Hey folks,

I’m fairly new to Unity but so far I am really loving it (coming from Torque). My issue is that I am trying to make a prototype virtual tour and I want the ‘tourer’ to be able to fly around the scene. As a ‘down and dirty’ kind of flyer, I modified the existing FPSWalker script like so:

var speed = 6.0;
var jumpSpeed = 8.0;
var gravity = 20.0;

private var moveDirection = Vector3.zero;
private var grounded : boolean = true;

function FixedUpdate() {
	if (grounded) {
		// We are grounded, so recalculate movedirection directly from axes
		moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
		moveDirection = transform.TransformDirection(moveDirection);
		moveDirection *= speed;
		
		if (Input.GetButton ("Jump")) {
			moveDirection.y = jumpSpeed;
		}
		if (Input.GetButton ("Fire1")) {
			moveDirection.y -= jumpSpeed;
		}
	}

	// Apply gravity
	//moveDirection.y -= gravity * Time.deltaTime;
	
	// Move the controller
	var controller : CharacterController = GetComponent(CharacterController);
	var flags = controller.Move(moveDirection * Time.deltaTime);
	//grounded = (flags  CollisionFlags.CollidedBelow) != 0;
}

@script RequireComponent(CharacterController)

essentially just set the grounded variable to true, disabled the grounded checker, disabled gravity then used the left ctrl key to make my ‘character’ move down at jumpspeed. Inside the Unity Previewer it works fine, but once build it and run it in the webplayer, I just kinda sit in one place and won’t move at all. Can anyone help me out with this?

This manual page explains how you can get debug logging information while using the webplayer. You can try putting print statements into the code to establish what part is going wrong (for instance, you can tell if the jump button is pressed by printing a message from within that “if” statement). Also, check the build log (on the console window, click the Show Editor Log button just after a build). This can often give you useful information if something has not been added to the build correctly.

Sometimes a webplayer’s inputs are affected by JavaScript in the host page. Is there anything else going on in the page that could affect the webplayer?