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"

How to make Virtual Joystick button function for buttons?

So I'm trying to make car rotate on button clicks same as it does with joystick. But apparently, I don't know how :'(

alt text

Currently I got 2 buttons for each half of screen. How to set up rotation angle depending on time pressed of those buttons and reset it on release?

Product Version: UE 4.18
asasasas.png (55.0 kB)
more ▼

asked Mar 03 '18 at 02:30 PM in Blueprint Scripting

avatar image

31 6 7 14

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

1 answer: sort voted first

You can bind on the event "OnClicked" of each button. I will probably do it in this way: When (for example) the left button is clicked, you can start a timer that will increase a float value to a max or to a value you want. In BP you will do: "OnClicked"->SetTimerByFunction (or "SetTimerByFunctionName). This function will have the duty to increase your rotation angle till the button is pressed.

When the button is released, you will "ClearAndInvalidateTimerByHandle" of the function so that your rotation angle will stop increasing.

more ▼

answered Mar 03 '18 at 02:36 PM

avatar image

66 1 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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