Game in slowmotion when frames are locked at 60 fps

Hey all, I ran into this issue where when I lock my frame rate at 60 fps the game plays in slow motion (see videos, first is without the frame rate lock and second is with the frame rate lock to 60 FPS)

In both videos it runs on around 40 FPS, so why is the game in slow motion when I lock it to 60 FPS?

No frame rate lock: No frame rate lock - YouTube

Frame rate locked on 60 FPS: Frame rate locked at 60 FPS - YouTube

This is the option I mean:

Any help is appreciated :slight_smile:

It seems a fixed framerate is not the same as a min - max clamp… Probably the engine runs slow motion when it can’t match it properly.

Also, Are you properly multiplying your movement inputs by delta time?

My project does the same thing… it probably has something to do with tickrates, but you can just use t.maxfps 60 in console to limit FPS without this issue.

Hey there @Faze_Kaas! When you lock the frame rate, you’re essentially telling the game “Hey this games ticks are supposed to run at this rate per frame” but in this case, you cannot meet the requirements only hitting 40fps, so you’re going to effectively tick 33% slower. Since game logic is handled on tick as well the effects everything.

It’s recommended not to lock your framerate unless it is a requirement for wherever you’re hosting. Best I would say is to set a maximum framerate via the command t.maxfps 60 and leave the other 2 options off.

Roy’s the fastest in the west it seems. Edit: NightHawk beat me to it too!

2 Likes

Hey, yeah seems like it, what do you mean with multiplying movement inputs by delta time?

Hey, is that only a fix for in the viewport, or does t.maxfps 60 stay when you package the game?

Hey, thanks for explaining

Same question to you does it also work when you package the game or is this just for in the viewport?

Also I was wondering if you knew this: why is my fps only 40 in the first place?
I tested it aswell on a completely new project (packaged aswell, videos above here were also packaged) and also had 40 fps, now I play on 2560x1440, but it seemed weird to only have 40 fps even in a game with almost nothing in it.

Thanks

The command works in packaged builds as well, but will need to be called on that side. If you’re using primarily blueprints you can use this node

Execute Console Command | Unreal Engine Documentation.

If you’re using C++ just know it needs to be called from a player controller

playerControllerRef->ConsoleCommand("t.maxfps 60");

Funny enough I learned this way back when Ark was popular, as it’s a command that can be used in unreal games that never block the functionality.

1 Like

iv had good success with set framerate limit. its not completely locking the fps to 60, but it is keeping it below it. may be worth a try.
image

Hey thanks, where would I place that node?
Just after the event tick? or Eventbeginplay? or something else?

Same question for you, where would I place this node?

place it where you want. if you wanted this to be set at the game opening, place it in your level BP close to the beginning of event begin play. this is fire and forget so no need for tick.
youll need to give it a reference to game user settings, then save game user settings after for it to be set.

Oh wow I didn’t realize they added a node for it. I’ve got a library that I pull in for all my projects that still does it the old way. That’s much better than forcing commands, especially if you have to break them off from players.

and @Faze_Kaas I’d recommend the same, if you ever need to activate something per session, pop it in your save as well so you can use it and set it on a per user basis.

Settings are normally written to .ini files including the settings set by GameUserSettings.
GameUserSettings is used in BP and c++ to set up basic settings like VSync , resolution etc.

Optimally where it runs once in the GameInstance(/Subsystem), or when you want to change the setting from the UI, (in a central settings manager)

Alright :slight_smile:
Thanks everyone