Skip to main content
2 of 4
added 222 characters in body
Hackworth
  • 2.9k
  • 1
  • 24
  • 27

this.positionVector = this.playerSpawn.positionVector;

This seems to be your problem line. It is indeed a reference; try calling

this.positionVector = this.playerSpawn.positionVector.Clone();

Edit: Not sure what guarantees Clone() makes, so if that fails, try:

Vector2D vector = this.playerSpawn.positionVector;

this.positionVector = new Vector2D(vector.X, vector.Y);

The latter will work for sure.

Hackworth
  • 2.9k
  • 1
  • 24
  • 27