Nonsense framedrop

Godot Version

Godot 4.4 Stable

Question

This code runs once in the only player instnace (it’s not a loop or anything). It gives me a punctual drastic framedrop. When commenting the first line and uncomenting the second, framedrop disappears. Esencially I’m just using a different transform. How? The first transform is valid, player spawns correctly. Both transforms are located in similar places in the level too. It just drastically drops the fps for a moment… No idea why.

You can try to break this calculation in smaller parts and test which exacty calculation gives you the framedrop

thanks for the answer. yes, I’m trying this now, but even so it does not make sense because I’m only getting transforms and multiplying, I don’t see how this could cause frame drops.

This could be a engine bug, so please find out which operation specifically causes this lag

1 Like

Inverting a matrix can be expensive (or impossible), depending on the contents, IIRC.

2 Likes