public override void action(IUsersInput input, ObjectMotionController obj) { float dv = Mathf.Sin(angles[input.nActual - 1] - Mathf.Atan2(input.GetVertical(), input.GetHorizontal())) * input.speed; angles[input.nActual - 1] = Mathf.Atan2(input.GetVertical(), input.GetHorizontal()); obj.velocity.x += dv; }
protected float dv(IUsersInput input) { float dv = Mathf.Sin(angles[input.nActual - 1] - Mathf.Atan2(input.GetVertical(), input.GetHorizontal())) * input.speed; angles[input.nActual - 1] = Mathf.Atan2(input.GetVertical(), input.GetHorizontal()); return(dv); }
public override void action(IUsersInput input, ObjectMotionController obj) { if (indicationScript != null) { indicationScript.enableFrontBack(input, -input.GetVertical()); } obj.velocity.z += -input.GetVertical() * input.speed; }
public override void action(IUsersInput input, ObjectMotionController obj) { if (indicationScript != null) { indicationScript.enableOrY(input, input.GetVertical() * input.speed); } obj.rotation.z += input.GetVertical() * input.speed; }
public override void actionCam(IUsersInput input, CameraMotionController obj) { obj.MoveDistanceFromObject(input.GetButtonX() - input.GetButtonY()); obj.MoveDown(input.GetVertical() * input.speed); obj.MoveRight(input.GetHorizontal() * input.speed); }