TransWikia.com

Why do my objects become transparent instead of being removed with UPBGE?

Blender Asked by João Pedro de Vecchi Ferruci on December 17, 2020

I add an object using addObject(), but when I put a time to be alive, when the time ends, the object does not delete, it becomes transparent. See:

enter image description here

Why?

Script:

from bge import *
from mathutils import *
from random import randint

class Component(types.KX_PythonComponent):

  args = {
    "speed" : 0.1
  }

  def start(self, args):
    self.speed = args["speed"]   
    
    scene = logic.getCurrentScene()
    
    empty = scene.objects["Empty"]
    
    for object in range(11):
        torus = scene.addObject("Suzanne", empty, 33.0)    
        
        torus.worldPosition = [randint(-20, 20), randint(-20, 20), 1]
        
  def update(self):
    pass

I am using UPBGE 0.3.0.
[I speak portuguese, sorry for english mistakes]

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP