KX_BatchGroup(EXP_Value)

base class — EXP_Value

class KX_BatchGroup(EXP_Value)

The batch group is class containing a mesh resulting of the merging of meshes used by objects. The meshes are merged with the transformation of the objects using it. An instance of this class is not owned by one object but shared between objects. In consideration an instance of KX_BatchGroup have to instanced with as argument a list of at least one object containing the meshes to merge. This can be done in a way similar to:

import bge

scene = bge.logic.getCurrentScene()

batchGroup = types.KX_BatchGroup([scene.objects["Cube"], scene.objects["Plane"]])
objects

The list of the objects merged. (read only)

Type

EXP_ListValue of KX_GameObject

merge(objects)

Merge meshes using the transformation of the objects using them.

Parameters

objects – The objects to merge.

split(objects)

Split the meshes of the objects using them and restore their original meshes.

Parameters

objects – The objects to unmerge.

destruct()

Destruct the batch group and restore all the objects to their original meshes.