I was curious what the .setParent() does I seen it done with the .Addobject() does it lower processing like if there was 50 cubes all parented to one cube?
TL;TR The reason people use the Python equivalent for parenting is simply because they may prefer to do so (i.e. selective parenting, less logic bricks/nodes) or they do not know any better.
Parenting an object using KX_GameObject.setParent() will be slower then parenting using the Parent actuator or directly in Blender because C++ > Python.
no, trough python you can simply add an object or multiple and parent them to an other object.
What you are looking for is KX_BatchGroup (depricated in upbge 3.0+). This option can put like 50 cubes into a batchgroup and will basically render as 1 call instead of 50 calls thus reducing processing time.
So there is no way to batch object anymore if its just drawing the same thing over and over?
I don’t know, maybe they implemented it, i don’t use 3.0 i’m using 2.5 so can’t say.
Could you tell me how to program it on 2.5 please? sometimes it still works.
Here is the doc for it, should be clear.
https://upbge.org/docs/v0.2.5/api/bge.types.KX_BatchGroup.html#KX_BatchGroup
I will try it thank you!
Nope it doesn’t work anymore.