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"

Rolling Ball Game FPS Issues

I'm working on a small rolling ball game as a quick project, and I'm running into FPS-related issues. The screenshots below are of my pawn BP, and the movement is exactly the way I want it... at 120 FPS. The pawn's max straight-line speed is about 658 at 120 FPS. If I uncap the FPS, the max straight-line speed goes to somewhere around 3530, and with FPS capped at 30, it's 50. I'm looking for a way for the pawn to move at consistently the same speed, regardless of FPS.

Any and all suggestions are appreciated.

Product Version: UE 4.15
Tags:
1.png (281.8 kB)
2.png (273.4 kB)
more ▼

asked May 13 '17 at 12:16 AM in Blueprint Scripting

avatar image

gooberCP
23 1 3 8

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

1 answer: sort voted first

Hi,

You can use is 'GetWorldDeltaSeconds'.Multiply it with your end speed that is responsible for movement. It'll make your movement consistent over all frame-rates. (this will slow down your speed, so to overcome, you can multiply with some offset like '30' may be.. ) basically, what it does is 1/FPS here is the detailed explanation: https://www.youtube.com/watch?v=8DxnRPwZMOs

let me know if it works.

thanks

more ▼

answered May 13 '17 at 03:49 AM

avatar image

TahaRizvi
88 2 5 11

avatar image gooberCP May 13 '17 at 04:10 AM

Hi, thanks for the reply!

I tried your suggestion and sadly the issue is still happening - except in the reverse. When I cap at 30 FPS, I get very high speeds, when I uncap, I get slightly lower speeds. See the below screenshots for the edits I made.

Note that I'm using Add Angular Impulse and Set Angular Damping - not Add Force or the other ways to move the pawn. I'm doing this because I want the movement of the pawn to be dependent on physics, taking friction into account - rather than just adding a force to the ball, the ball moves because of friction with surfaces it's touching. alt text

3.png (104.9 kB)
4.png (181.1 kB)
(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