WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unreal mouse

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts
View previous topic :: View next topic  
Author Message
SteK



Joined: 12 Mar 2008
Posts: 4

Digg It
PostPosted: Sun Apr 13, 2008 11:38 am    Post subject: Unreal mouse

hello there,
i want to use the pitch and roll to look around unreal 3 (for a university project) and i've assigned the roll to the left and right arrow keys to look on the x axis but i want to use the pitch as the mouse y axis, any surggestions for code to use?
any help will be much appreciated

ps am not a very experienced coder so with any code an explination of how it works(unless ded simple) would also be very helpful

cheers
_________________
I thought what i'd do was become one of those deaf mutes, or would I?
Back to top
View user's profile Send private message
kappa



Joined: 11 Apr 2008
Posts: 12

Digg It
PostPosted: Mon Apr 14, 2008 7:25 pm    Post subject:

well if i understood correctly this is what you are looking for if i diddnt sry Smile
tell me what i got wrong

Code:
If Wiimote.RawForceZ > 4 Then Mouse.y = Mouse.y - 0.001 * 2 * (Wiimote.RawForceZ - 4)
If Wiimote.RawForceZ < -4 Then Mouse.y = Mouse.y - 0.001 * 2 * (Wiimote.RawForceZ + 4)


basicly this moves your mouse up and down. if you change all 4s to higher number you make wiimote less sensitive and vice versa. and those 2s control mouse speed.

this two lines of code ware originaly from here

Code:
// Code for playing FPS Games
// Posted by Fred_31_ from the Kasten's script

_________________
xfire: bulletdeal
Back to top
View user's profile Send private message
WakeUpWolfgang



Joined: 27 Apr 2008
Posts: 1

Digg It
PostPosted: Sun Apr 27, 2008 8:23 pm    Post subject:

hay you stole my idea I have written the code to do it. i am witting a tourtol on how to it for UT. But i am using the Nunchuk for WASD and the pitch and roll for the mouse.

Code:
// WASD for fsp games
w = Wiimote.Nunchuk.JoyY < -0.5
a = Wiimote.Nunchuk.JoyX < -0.5
s = Wiimote.Nunchuk.JoyY > 0.5
d = Wiimote.Nunchuk.JoyX > 0.5

// This is the code that moves your mouse
if var.xRot > var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot + var.zCutoff)


sorry for the spelling
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group