I have an object that I want to stay stationary and when it is created I want it to 'spawn' on the current position of a moving object, but the stationary object starts moving with the moving object.
For more context I want to spawn a bomb on the position of a player and have the bomb sit there, but the bomb begins to move with the player.
Here is my code for the bomb object:
`class Bomb:
def init(self, pPos):
self.pos = pPos
So I think the program may be accessing and applying all physics etc. to all objects at the players location, is there a way I can fix this maybe? Or should I just offset the bombs position when spawning?
I have an object that I want to stay stationary and when it is created I want it to 'spawn' on the current position of a moving object, but the stationary object starts moving with the moving object. For more context I want to spawn a bomb on the position of a player and have the bomb sit there, but the bomb begins to move with the player. Here is my code for the bomb object: `class Bomb: def init(self, pPos): self.pos = pPos
and the object is create simply like:
bomb = Bomb(player.pos)
Then in
def draw()
I simply run the bombs draw function, but the bomb keeps moving with the player.