x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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. alt text

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. alt text

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.

Product Version: UE 4.12
Tags:
more ▼

asked Jun 19 '16 at 07:07 PM in Blueprint Scripting

avatar image

elitereloaded
694 24 24 55

avatar image elitereloaded Jun 19 '16 at 10:55 PM

Bump. Has no one needed to do this before? Seems like something that would be used a lot.

Looks like someone had the same question about UE 4.8 and it never had a good answer/solution.

https://answers.unrealengine.com/questions/288211/get-input-mouse-delta-is-always-0-if-no-mouse-butt.html

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question