godot-python icon indicating copy to clipboard operation
godot-python copied to clipboard

frame drops with moving RigidBody2D instances

Open paolobb4 opened this issue 7 years ago • 1 comments

Hi, I think I found a big problem. Aparently having several instances of RigidBody2D in movement (through the property RigidBody2D.linear_velocity) that have a script assigned causes the frame rate to drop drastically, even if the script does nothing.

The same is not true if they are assigned a gdscript instead or if no script is asigned but instead the main scene is the only one to have a script. It might be that it has to do with the script being instantiated many times yet this only is a problem if the objects are in movement, no frame drop is present if the objects are resting.

This is probably a hint to something else beneath the surface that drastically limits performance. I've made a demo project so you can test it yourself. I copy-pasted the readme file in the description above but at the end of it are some indications about the files.

ps: It might just be my computer though, but I would't know that :sweat_smile:

paolobb4 avatar Jun 21 '18 14:06 paolobb4

Thanks for reporting,

I guess is kinda linked with #101, performance is a big concern but we need to do correctness first (who knows, maybe we'll hit two birds with one stone ^^)

ps: It might just be my computer though, but I would't know that sweat_smile

Pretty sure it's not your computer ;-)

touilleMan avatar Jun 25 '18 07:06 touilleMan