#getting very low fps with simple scene & default script for CharacterBody3D on move_and_slide

5 messages · Page 1 of 1 (latest)

gilded kayak
#

Hi, I'm experimenting with Godot 4.2.1 + 3D for the first time and am getting very low fps for a simple 3D scene. Basically I have a CharacterBody3D sitting on top of a StaticBody3D. The only collision logic I have going on is the default script that Godot provides when you attach a new script to CharacterBody3D from the editor. When I have it calling move_and_slide() it tanks the FPS to like ~1-20 FPS depending on if I call it from _physics_process vs _process (it's slower in _physics_process). If I comment that line out it goes back up to ~140 fps (since there're no collision calculations going on).

I tried switching the physics engine to godot-jolt and that seems to work as expected (getting ~120 fps when I move the character around, it's very smooth). Am I missing something obvious here? I'm on an M1 macbook pro and was roughly following the KidsCanCode Intro to 3D.

GitHub

Godot Jolt is a Godot extension that integrates the Jolt physics engine - godot-jolt/godot-jolt

#

This is the whole scene by the way

pale gull
#

Hi there 👋,
Did you touch any of Godot's Project Settings regarding rendering and/or physics? E.g. enabled V-Sync or run the physics engine run on a separate thread? Or increase the precision of the physics engine by increasing some calculations precision, cycles or physics FPS?

Did you use godot-jolt after the fact the default physics engine didn't work for you or did you have it installed before switching in the project settings?

gilded kayak
#

I didn't touch the default rendering/physics settings except to try out godot-jolt. I guess I did toggle the renderer itself a couple of times to see if any of the different renderers performed better (am currently on Forward+).

Current project settings:

  • V-sync is enabled
  • Run physics engine on separate thread is disabled
  • Others (see attached images)

Did you use godot-jolt after the fact the default physics engine didn't work for you or did you have it installed before switching in the project settings?

The former, I only installed it after searching around to see if there was a way I could make this run faster 🤔

pale gull
#

Have you tried disabling V-Sync, it leads to stuttering from time to time, though not to your extreme. Just to rule out any quirks up front.