code for part 1:
var.Y = MapRange(wiimote2.Pitch, -90, 90, 1, -1)code for part 2:
var.X = MapRange(wiimote2.Roll, -90, 90, 1, -1)
var.S = 0.8
joystick3.Vibration1 = var.X*var.S
joystick3.Vibration2 = var.Y*var.S
var.xRot = Wiimote2.RelAccX
var.yRot = Wiimote2.RelAccY
joystick3.Vibration1 = MapRange(var.xRot, -50, 50, -1, 1)
joystick3.Vibration2 = MapRange(var.yRot, -50, 50, -1, 1)
note the joystick/wiimote numbers. your mileage may vary.
No comments:
Post a Comment