Please make it emulate the Mouse to play FPS Games, also assign each button to keyboard and mouse keys. |
@hawkinse Is this possible to do with your FreePIE bridge that you wrote? https://bitbucket.org/hawkinse/psmovefreepiebridge I've never used FreePIE myself, but I get the impression the whole point of that tool is for remapping controller input and making other virtual controllers. @zelmon64 I think you've done something like this before with a virtual xbox controller in FreePIE? EDIT: Fixing username |
at 2:40: https://www.youtube.com/watch?v=K76wP2dxBks |
@HipsterSloth@andregm3 The location of the mouse can be controlled with FreePIE, just need to write a python script that keeps track of the last known location since FreePIE's mouse handling expects deltas. It won't do button handling though, since the IO plugin I'm using only supports location and rotation. |
I played a lot of Killzone3 with my psmove. It was actually an advantage compared to regular controller. I wasn't great at the game but I often did well in multiplayer. Anyway, I can tell you that it won't work for most games. It'll only work for games that allow the crosshairs to move independently of the view. There are 2 ways I've seen this implemented:
Please give me an example of a PC game with that mechanic. Also, be sure that the mechanic isn't only for some peripheral (e.g. light gun) but also works with mouse-controlled crosshairs. Finally, I won't do this myself, but after the CAPI is done it shouldn't be too difficult for someone else to come along and write a client app that does what you want. I think it'll need a custom app because what you'll want to do is create a 'virtual screen' that's at the same location, size, and resolution as your real screen, then return the controller's aim-vector's intersection with the screen as the cursor position. |
Actually, I wonder if this kind of mechanic already exists in VR inside steam's theatre-thing that it uses to play flat games in VR. That's how it works for operating the desktop from within SteamVR, but I've never tried a flat game where you can click on various parts of the screen. Anyone know? |
@HipsterSloth@andregm3 I added button support to my FreePIE bridge. The IO plugin only supports position/rotation, but I can send multiple position/rotation structs at a time so I store the button information as a 0 or 1 across two extra structs. Kludgey, but it works. I've also added an example script showing how to use it for mouse control. Trigger is left click, Move button is right click and square is middle click. FreePIE is capable of mapping to the keyboard as well, so you can set any button on the move to any keyboard or mouse key you want. |
@cboulay we add mouse look and the developers start building over it, unity, UE4 any mouse + FreeTrack do headtrack, maybe some mods to add to games, i saw a guy made it work in HalfLife: |
It's the opposite of 'mouse look'. You want '(look-)decoupled aiming' or 'deadzone aiming' or something like that. Apparently Arma 2 has deadzone aiming. I seriously doubt a developer will add support for this kind of aiming just for PSMoveService users if they didn't already add it for the Hydra users, or for the WiiMote users, or for any other 3D controller users. It's not relevant for VR for obvious reasons. Except that maybe some 'flat' games will start supporting this kind of input if it's used through SteamVR's in-vr theatre mode. I think your best bet is to find games or mods that already have this kind of mechanic. Arma2 and HL2's mod are certainly interesting. But this kind of input might also be an interesting way to use a PC generally, even outside of FPSs. e.g., using it as a pointer on a projected screen on a wall. |
For Sure ! like painting: https://www.youtube.com/watch?v=VBAAbVSqGng |
This Guy made this app to mouse but only works in Windows 7 i think. |
it works ! thanks: https://www.youtube.com/watch?v=GZDKzf5OtOM should we calibrate something now ? |
Another video example of PS Move in Action now on PSVR trail game: https://www.youtube.com/watch?v=r3p7R4_9MJo |
Mouse emulation (like Hydra emulation) would have to be handled by an external client. I'm closing this issue. @andregm3 You are invited to make a Wiki entry about how to emulate mouse (and separately, Hydra) using PSMoveService. |
#pragma once |
#include'GameFramework/Actor.h' |
#include'MoveDelegate.h' |
#include'MovePluginActor.generated.h' |
/** |
* Placeable Actor Example that receives Move input, |
* override any delegate functions to receive notifications. |
* Calling super is not necessary. |
* |
* NB: This is just an example actor, use the MovePlayerController for own |
* classes. |
* Copy implementations to receive same functionality in a different class. |
*/ |
UCLASS() |
class AMovePluginActor : public AActor, public MoveDelegate //Multiple Inheritance, add MoveDelegate inheritance to inherit all delegate functionality |
{ |
GENERATED_UCLASS_BODY() |
/** |
* We Override every delegate function to forward them to blueprint events, |
* but if you're extending C++ class yourself you can override just the ones |
* you are interested in. |
*/ |
virtualvoidEventMovePluggedIn() OVERRIDE; |
virtualvoidEventMoveUnplugged() OVERRIDE; |
virtualvoidEventMoveControllerEnabled(int32 controller) OVERRIDE; |
virtualvoidEventMoveControllerDisabled(int32 controller) OVERRIDE; |
virtualvoidEventMoveDocked(int32 controller) OVERRIDE; |
virtualvoidEventMoveUndocked(int32 controller) OVERRIDE; |
virtualvoidEventMoveAnyButtonPressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveB1Pressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveB1Released(int32 controller) OVERRIDE; |
virtualvoidEventMoveB2Pressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveB2Released(int32 controller) OVERRIDE; |
virtualvoidEventMoveB3Pressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveB3Released(int32 controller) OVERRIDE; |
virtualvoidEventMoveB4Pressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveB4Released(int32 controller) OVERRIDE; |
virtualvoidEventMoveTriggerPressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveTriggerReleased(int32 controller) OVERRIDE; |
virtualvoidEventMoveTriggerChanged(int32 controller, float value) OVERRIDE; |
virtualvoidEventMoveStartPressed(int32 controller) OVERRIDE; |
virtualvoidEventMoveStartReleased(int32 controller) OVERRIDE; |
virtualvoidEventMoveControllerMoved(int32 controller, |
FVector position, FVector velocity, FVector acceleration, |
FRotator rotation) OVERRIDE; |
//Define blueprint events |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMovePluggedIn(); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveUnplugged(); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveControllerEnabled(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveControllerDisabled(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveDocked(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveUndocked(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveAnyButtonPressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB1Pressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB1Released(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB2Pressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB2Released(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB3Pressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB3Released(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB4Pressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveB4Released(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveTriggerPressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveTriggerReleased(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveTriggerChanged(int32 controller, float value); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveStartPressed(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveStartReleased(int32 controller); |
UFUNCTION(BlueprintImplementableEvent, Category = MoveEvents) |
voidMoveControllerMoved(int32 controller, |
FVector position, FVector velocity, FVector acceleration, |
FRotator rotation); |
//Callable Blueprint functions |
/** Check if the Move is available/plugged in.*/ |
UFUNCTION(BlueprintCallable, Category = MoveFunctions) |
boolMoveIsAvailable(); |
/** Poll for latest data. Returns false if data is unavailable.*/ |
UFUNCTION(BlueprintCallable, Category = MoveFunctions) |
boolMoveGetLatestData(int32 controller, FVector& position, FVector& velocity, FVector& acceleration, FRotator& rotation, |
FVector2D& joystick, int32& buttons, float& trigger, bool& docked); |
/** Poll for historical data. Valid index is 0-9. Returns false if data is unavailable.*/ |
UFUNCTION(BlueprintCallable, Category = MoveFunctions) |
boolMoveGetHistoricalData(int32 controller, int32 historyIndex, FVector& position, FVector& velocity, FVector& acceleration, FRotator& rotation, |
FVector2D& joystick, int32& buttons, float& trigger, bool& docked); |
//Required for delegate to function |
virtualvoidBeginPlay() OVERRIDE; |
virtualvoidTick(float DeltaTime) OVERRIDE; |
}; |