Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Godot project demonstating frame rate drop when using RigidBody2D in godot-python.

Notifications You must be signed in to change notification settings

paolobb4/godot-python_RigidBody2D_frame_drop_demo

Repository files navigation

This project demonstrates that 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.

godot-python is required to run this project. Remember to compile and add it to the project folder.

main.py: manually manages it's children objects wich are instances of RB2D.tscn (already assigned to Main.tscn).

rb2d-empty.py: defining a class that does nothing (already assigned to RB2D.tscn).

rb2d.py: manages itself, assigne to RB2D.tscn and disable Main.tscn's script to test.

rb2d.gd: manages itself, assigne to RB2D.tscn and disable Main.tscn's script to test.

About

Godot project demonstating frame rate drop when using RigidBody2D in godot-python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published