| View previous topic :: View next topic |
| Author |
Message |
ZW
Joined: 11 Jan 2007 Posts: 18
Digg It |
Posted: Fri Jan 26, 2007 9:18 pm Post subject: |
|
|
| blahblah wrote: |
c) if you use the wiimote as a gestural controller for musical instruments (my use) you can derive a lot of parameters from simple movements in a fairly predictable and intuitive way, making it a much more pleasing way of interacting with your instruments. |
Do you have any scripts for this floating around? I've been messing around with the same thing using Ableton Live and FL Studio, but I haven't started heavily into it yet. |
|
| Back to top |
|
 |
crono141
Joined: 27 Dec 2006 Posts: 33
Digg It |
Posted: Wed Jan 31, 2007 6:58 pm Post subject: |
|
|
cool, I'll have to try this out later.
What needs to be modified to get it to work with directinput? |
|
| Back to top |
|
 |
skyworxx
Joined: 04 Jan 2007 Posts: 53
Digg It |
Posted: Wed Jan 31, 2007 7:49 pm Post subject: |
|
|
@ carl
did you forget to add the offset.value to the mouse coordinates? i can't see them in the script
a version with directinput would also be veeeeery nice |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Thu Feb 01, 2007 2:17 am Post subject: |
|
|
OK, I fixed the offset thing that I forgot.
I assume that for DirectInput you just want to use the IR to move the mouse in FPS games and such things. You could also use any of the x,y,z,pitch,yaw or roll values instead if you prefer.
For a DirectInput (relative) mouse script you need to look at the difference (delta) in the position values and then scale it by something and add it to the DirectInput value. You can either use the smoothed values you get at the end, or you can use the unsmoothed values and then come up with your own smoothing more appropriate to an FPS.
For example, instead of setting the cursor position, you could do this:
if var.IRvis and (not var.Freeze) then
mouse.DirectInputX = mouse.DirectInputX + Delta(var.IRx)*0.5
mouse.DirectInputY = mouse.DirectInputY + Delta(var.IRy)*0.5
end if
That would make it like a mouse on a small mouse pad that you can't pick up when it gets to the edges. It is probably not suitable for an FPS game though.
You could also make it keep moving the mouse when you are pointing off the edge of the screen. Or you could come up with a completely different system which uses a speed based on how far the IR cursor is from the centre of the screen.
I don't have many FPS games, and I haven't tried playing FPS games with the Wiimote yet. So I don't know what is the best way to control them. |
|
| Back to top |
|
 |
crono141
Joined: 27 Dec 2006 Posts: 33
Digg It |
Posted: Thu Feb 01, 2007 5:08 pm Post subject: |
|
|
| Quote: | | Or you could come up with a completely different system which uses a speed based on how far the IR cursor is from the centre of the screen. |
That is exactly the kind of control I've been looking for ever since this concept came into being.
I've got a modified one that uses PPjoy and turns the screen into the joystick's movement range, but its spotty at best (it accelerates way too quickly after getting outside a small circle in the middle of the screen). |
|
| Back to top |
|
 |
TiagoTiago
Joined: 20 Jan 2007 Posts: 711 Location: Brasil
Digg It |
Posted: Thu Feb 01, 2007 5:27 pm Post subject: |
|
|
for fps games, check my hybrid cursor movement engine http://www.wiili.org/index.php/RAHCMEFFPSG  _________________ please put the scripts on the wiki so they dont get lost as new stuff is posted!
I don't always get notifications of new replies, if you see a thread I should have responded, could please email me? |
|
| Back to top |
|
 |
crono141
Joined: 27 Dec 2006 Posts: 33
Digg It |
Posted: Thu Feb 01, 2007 6:45 pm Post subject: |
|
|
WOW, I just looked at that script, and man, that is cool. Its absolute movement in a small box in the middle right, with relative movement outside.
That is brilliant. Kudos!
I'm guessing we add our own favorite nunchuck controlls to this, right? |
|
| Back to top |
|
 |
|