|
replaceMeshreplaceMesh(mesh, DisplayMesh, PhysicsMesh)Replace the mesh of the object with a new mesh.mesh: name of the mesh
Type: string DisplayMesh: Type: bool
True or 1
= Show the replacement mesh
False or 0 = Don't show the replacement mesh PhysicsMesh: Type: bool
True or 1
= Update physics with new mesh
False or 0 = Don't update physics Sample Code# get the controllercontroller = GameLogic.getCurrentController()# get game object controller attached toobj = controller.owner# replace mesh, show it, update physicsobj.replaceMesh("Dent", True, True) |