On my quest to make some fun weapons for my game, I have been modifying my laser script to shoot bullets. In the script, I have to use applyMovement( ) to (try) to move a bullet object.
Why use this, you ask? I want to use a ray to ‘hit’ an object (and then deduct the damage etc) so moving bullets is cosmetic (without them it looks a bit odd). Thing is, any object that is dynamic (which you need to move an object via addobject) also interferes with the ray.
I have tried to use applyMovement( ) as it works on ‘no collision’ objects but I cannot get the bullet to move! I realise that I am really setting the position but how would I keep on moving the object?
Here is a portion of the code:
bullet.worldPosition = [6,0,0] movement = [ 0.0, 5, 0.0] local = True bullet.applyMovement( movement, local)
So how do make the bullet in the code above update its position?