title: Accessing attributes in functions within the class returns wrong values
body: <p>I have a constructor</p>
  <pre><code>GameObject::GameObject(Node body){
      _body = body; 
  
      glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f);
      glm::vec3 velocity = glm::vec3(0.0f, 1.0f, 0.0f);
  
  };
  </code></pre>
  <p>and a member function</p>
  <pre><code>void GameObject::update(float dt) {
      this-&gt;position = this-&gt;position + this-&gt;velocity * dt;
  }
  </code></pre>
  <p>After calling the constructor, I call the update function on the same object.</p>
  <pre><code>GameObject* go_water = new GameObject(water);
  go_water.update(dt);
  </code></pre>
  <p>However, if I use debug mode in visual studio and a breakpoint within the update method, I see that this-&gt;positions contains all &quot;-431602080.&quot;. Why is this?</p>