Max FPS - Discord Import

Hi! I’m noticed that the maximum number of fps does not exceed 50 on my laptop (MacBook Pro with M1 Max), and 40 on my phone (iPhone 13 Pro Max), even on an empty scene.
I checked that engine limited to 60 fps, but even that value can’t be reached.

Original Post on Discord

by user 301690209303658496

Can you try setting the targetFramerate to undefined this.context.targetFramerate = undefined ?

Can I set it like this?
Needle.Context.Current.targetFramerate = undefined;

by user 301690209303658496

yes for example, depending on when you call it.
If you have a component already you can use this.context.targetFrameRate in the component start or awake methods.
Or via

NeedleEngine.addContextCreatedCallback((args) => {
  args.context.targetFrameRate = undefined;

Perhaps we should add a static field to set default values without any need to get a context

Yep, that works!

by user 301690209303658496

Alright so framerate calculation doesnt work properly on iOS/mac?
Which engine version are you currently using?


by user 301690209303658496

Ok thanks. Strange that it behaves differently.

Which browser are you using?

Tried Chrome, Brave (based on Chromium), and Safari (safari has the strangest behavior, shows only 40 fps, btw as I know safari limits fps by its self to 60 even if display can show more).

by user 301690209303658496

But yeah, looks like all browsers have problems

by user 301690209303658496

Chrome and safari with targetFrameRate set to undefined

by user 301690209303658496

ah ok that’s good to know. Thanks!


by user 301690209303658496

that’s with targetframerate set to 60?


by user 301690209303658496

Ok thank you

Added it as an issue internally

Hi y’all! Just chiming in to say I’m having the same issue, including on totally blank, from-scratch projects. I’ve just been rudely doing this.context.targetFramerate = 120; to get things moving at 60 fps. I’m on an iPhone 14 Pro, Needle 3.26.2 preview.

by user 762750243346710568