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 do I change it so the character speed is not based on frame rate? (Auto-Run system)

I'm currently creating an infinite runner game, which requires the character to constantly run forward - I currently have it set up but I've realised that this is FPS dependant. I also have a speed meter using UMG, which shows the variable speed, which should be flat.

Image of the blueprint below.

alt text

Any help would be appreciated on fixing this issue. Thanks.

Product Version: Not Selected
blueprint.png (108.7 kB)
more ▼

asked Sep 04 '14 at 12:42 PM in Blueprint Scripting

avatar image

434 40 40 46

avatar image jaragoondoo Sep 04 '14 at 12:58 PM

You're feeding in your speed into a scale value. Scale values are normally a value between 0.0 and 1.0 (1.0 being the "max speed").

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

1 answer: sort voted first

You could do two things:

Change the Scale Value input to 1.0.

Then go into defaults and change "Max Walk Speed" to whatever your Movement Speed is.

If you don't have a Max Walk Speed inside of defaults, then reparent your blueprint to Character (File>>Reparent blueprint>>Character). You'll know have a Movement Component inside of defaults which will let you edit the value of Max Walk Speed.

Now with this done, your character will move forward at this speed (Max Walk Speed * Scale Value).


Manually update the Actor's location by multiplying the output of GetForwardVector with DeltaTime and MovementSpeed (GetForwardVector*(DeltaTime*MovementSpeed)), and then adding this value onto your Actors location with SetActorLocation (see image below): alt text

more ▼

answered Sep 04 '14 at 02:24 PM

avatar image

354 13 9 25

avatar image Kenomica Sep 04 '14 at 03:08 PM

Thanks for the replies. That worked perfectly.

My reasoning for not using the Max Speed method was that I want the player to speed up and slow down based on various power-ups / de-buffs etc.

But after reading your reply I realized I could still do this by having the scale value a variable and use values like 0.35 etc.

Much appreciated !

avatar image jaragoondoo Sep 04 '14 at 03:42 PM

No problem. I'm glad you learnt something new. You could even set the scale to a negative to make the character move backwards!

(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