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"

Is it possible to add a speed limit when using torque for movement?

Hi, I'm currently building a game based off of the rolling ball template. I've made a few tweaks to the balls blueprint to shift it to a 3rd person controller but the movement is essentially the same as the default BP.

alt text

I'm currently trying to work out a way to set a max speed for the ball while keeping the torque value relatively high. Lowering the torque speed does reduce the max speed but also reduces the acceleration and general movement speed making the ball feel sluggish.

Ideally, I'd like to find a way to monitor the balls current speed along a given vector and prevent further torque being added until the speed has fallen below a set amount.

I'm not really accustomed to working with vectors as values and I'm not entirely sure of their effect but most recent attempt is this:

alt text

The section at the top for the boolean is supposed to be:

If the float "Max Speed", divided by the current velocity of a given vector is less than or equal to 1, then "Speed_Limit_[Axis]" equals true.

with the added check of;

When "InputAxis Move[Right/Forward]" is pressed, check corresponding "Speed_limit_[Axis]", if true, do nothing, if false add torque.

I've tried a number of values as Max Speed with no discernible difference to the balls control which leads me to think that there's something about vectors that I don't know that's affecting the outcome, or that the idea behind this is flawed.

In either case, any help would be much appreciated.

Product Version: UE 4.9
more ▼

asked Feb 01 '16 at 03:39 PM in Blueprint Scripting

avatar image

21 1 1 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

if you go into the ball mesh blueprint, check out the details panel for the mesh, and look at the physics category. expand the category to show the advanced details (the little arrow pointing down), and check 'Max Angular Velocity'. there you can set a value that limits how fast the ball spins, the result of which will cap your velocity no matter the amount of torque.

more ▼

answered Feb 01 '16 at 03:56 PM

avatar image

1.2k 48 31 86

avatar image philolo65 Nov 01 '18 at 08:24 PM

Thank you, this one helped me too! :)

(comments are locked)
10|2000 characters needed characters left
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