Hi guys. I have a question. How can I set world position for an object with setting linearVelocity as well??
This is example of my code:
from bge import logic, events
from mathutils import Vector
cont = logic.getCurrentController()
own = cont.owner
scene = logic.getCurrentScene()
keyboard = logic.keyboard
first_floor = Vector([-0.35608, 0, -2.4525]) if keyboard.events[events.ZEROKEY] == logic.KX_INPUT_ACTIVE: own.worldPosition = first_floor own.setLinearVelocity((0.0,120.0,0.0),True)
if name == ‘main’:
I get this world position after pressing “0” but get it imediatelly not with my velocity. Why? Can anybody help?