I've inherited a VRExpansion plugin based project to which I need to add functionality without changing the original code significantly. I basically want to get button and trigger event info from the Vive motion controller to implement a supervisory function to activities in the game. I can't figure out how to get access to those low-level events. Any suggestions?
Announcement
Collapse
No announcement yet.
VRExpansion plugin motion controller trigger events
Collapse
X
-
Use the EnableInput node to bind to the input for a player controller in any other actor, you can have it take over the input or continue to pass them along. Character auto bind to input, but you can read them in the player controller itself as well.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
-
This doesn't seem to work. My actor is spawned (SpawnActor) in a level blueprint. That actor's event graph blueprint has a Event BeginPlay thread that executes EnableInput with the GetPlayerCharacter and GetPlayerController functions as inputs. In that same event graph I have an MotionController (L) Trigger event, but it never fires. I get a console message saying "LogLevel: Warning: EnableInput on a LevelScript actor can not be specified for only one PlayerController. Enabling for all PlayerControllers." but I'm not sure if it's relevant. I suspect the game's existing character is taking input back after my EnableInput, but not sure how to correct this. My goal is to basically monitor hand controller button presses, regardless of what existing inputs may be enabled by other actors or characters.
Comment
-
Originally posted by robotnicbw View PostThis doesn't seem to work. My actor is spawned (SpawnActor) in a level blueprint. That actor's event graph blueprint has a Event BeginPlay thread that executes EnableInput with the GetPlayerCharacter and GetPlayerController functions as inputs. In that same event graph I have an MotionController (L) Trigger event, but it never fires. I get a console message saying "LogLevel: Warning: EnableInput on a LevelScript actor can not be specified for only one PlayerController. Enabling for all PlayerControllers." but I'm not sure if it's relevant. I suspect the game's existing character is taking input back after my EnableInput, but not sure how to correct this. My goal is to basically monitor hand controller button presses, regardless of what existing inputs may be enabled by other actors or characters.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
The player controller class is derived from your VRPlayerController. There is no code in the derived class or VRPlayerController that specifically enables input, probably because, as you say, player controller has input priority over everything. Where would you suggest I wrestle control from the controller so an actor can see those hand controller input switches since my spawned actor is clearly not the place?
Comment
-
Originally posted by robotnicbw View PostThe player controller class is derived from your VRPlayerController. There is no code in the derived class or VRPlayerController that specifically enables input, probably because, as you say, player controller has input priority over everything. Where would you suggest I wrestle control from the controller so an actor can see those hand controller input switches since my spawned actor is clearly not the place?
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Originally posted by mordentral View Post
Player controllers always enable input, you can literally just call the events but have them set to not block to the character.
Oh wait, I found the problem. This is embarrassing. My Vive controllers are incorrectly labelled left and right, so the one I was holding was not the one I was listening for. Sorry to waste your time. Really appreciate your assistance. Thanks.
Comment
Comment