Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCrusable

Posted 05 July 2013 - 06:43 AM

Well, in this case have you ensured that m_sfEntityBox.getVertexCount() returns at least four and called resize if that is not the case? 

Yes that was the problem thanks. I set the sf::VectorArray in the constructor of the Entity, and the way I was doing it before worked, which was sloppy and looked bad so I changed it. Thanks.

 

Edit: For the function void Entity::setPosition() do I need to use "this" for all the variables? I would think so because I am not using the function for the Entity but for a child class. It works as is, I am just wondering.


#2Crusable

Posted 05 July 2013 - 06:43 AM

Well, in this case have you ensured that m_sfEntityBox.getVertexCount() returns at least four and called resize if that is not the case? 

Yes that was the problem thanks. I set the sf::VectorArray in the constructor of the Entity, and the way I was doing it before worked, which was sloppy and looked bad so I changed it. Thanks.

 

Edit: For the function void Entity::setPosition() do I need to use "this" for all the variables? I would think so because I am not using the function for the Entity but for and child class. It works as is, I am just wondering.


#1Crusable

Posted 05 July 2013 - 06:41 AM

Well, in this case have you ensured that m_sfEntityBox.getVertexCount() returns at least four and called resize if that is not the case? 

Yes that was the problem thanks. I set the sf::VectorArray in the constructor of the Entity, and the way I was doing it before worked, which was sloppy and looked bad so I changed it. Thanks.


PARTNERS