Godot Version
4.3
Question
Hello there, I am struggling to find what causes so much fps drop in my scene when using movable nodes. I just need tools to identify the cause.
I made a player and npcs with CharacterBody3D and cars with VehicleBody3D, and i’m happy with that. But now I want a maximum of them to vivify my lowpoly city which feel like a desert for now. I need to decrease performance cost of them as much as I can do, simply in godot gdscript editor.
I would like to keep collision, or at least when the player is close enough (first or third person view). It’s ok if npcs overlap themselves a bit, but i would like the player cannot pass trough a car or npc, he’s not a fantom…
Godot profiler and monitor from debug window is not enough, i see physics time from going from 0 to 10ms then come back to 0 and doing that again and again, same for navigation, but it doesn’t show why or where to search. When 1 car is moving the fps drop from 280 to 110 fps, it’s too much there must be something. Even if I switch from VehicleBody3D with wheels to a simple CharacterBody3D with move_and_collide(), fps still drops drastically.
I tried to comment/uncomment some part of the code, moving code from _physic_process to _process, switching movement methods move_and_slide(), move_and_collide() and set velocity, I can’t figure it out and it is such a pain to find what causes frame drop. Is there too much statics collision boxes ? Too much calculation on physic loop? I have no clue where to search. I tried to lower the physic tick rate but it doesn’t looks good. Or is it a node attached to the vehicle? NavigationObstacle?
I think that if I had a more precise tool it would save me a lot of time instead of re-enabling each properties, each child node, etc.
I’ve heard about debug build mode but I didn’t find a tutorial anywhere or an example in video.