Capture mouse X/Y movement deltas without requiring InputAction(s)
How can I capture X/Y movement deltas so I can rotate an actor (a building) along the Z axis without requiring the user to press and hold a [mouse] button? I got as far as capturing the movement values but only when I hold down left mouse...
In a nutshell I have a CameraPawnController that extends PlayerController. On BeginPlay CameraPawnController creates a new instance of BuildingPlanner that extends Actor. BuildingPlanner is used by the player to find a location and (hopefully soon) rotation of a building before finalizing the building placement.
My BuildingPlanner StartPlan is called by CameraPawnController on left mouse button. DisableInput is called when the building plan is cancelled/finished, i will leave that out for brevity.
This is my attempt to grab the mouse movement on every tick so I can allow the user to rotate a building after selecting a location. The below only outputs the mouse movement values when I'm holding down left mouse button.
I need to remove this requirement because after the user selects a building from the HUD it shows them a "ghost" building to find the building transform. First step is finding a location, after they find a location they left mouse click to lock the actor to that location. Second step is finding the actor rotation Z by moving along mouse X and left mouse clicking to accept the rotation (thus the building plan) and then the BuildingPlanner actor's transform is sent to the server to be built.
asked Jun 19 '16 at 07:07 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here