Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - averagejoeprogrammer

Pages: [1]
1
General / Trouble using iterator for collision
« on: April 12, 2016, 11:22:35 am »
Hi,

I am having some troubles with the collision detection within SFML I have a Vector of skeletons
std::vector<Skeleton> *skeletons = new std::vector<Skeleton>();

I am then trying to test whether or not the main character intersects with the any of the enemies I am trying to do this using a iterator.

for (std::vector<Skeleton>::iterator it = skeletons->begin(); it != skeletons->end(); ++it)
       {
              if (mainCharacter->mSprite.getGlobalBounds().intersects(it->mSprite.getGlobalBounds()))
              {
                     /*skeletons->erase(skeletons->begin() + *it);*/
                     skeletons->erase(*it);
              }
       }

Do you have any idea what I am doing wrong here?

Kind Regards

2
SFML website / Unable to reset password on Main Forum account
« on: April 12, 2016, 10:56:26 am »
Hello,

I am unable to reset my password on my main forum account. When I use the reset my password functionality I do not receive any email. I have checked my junk folder etc. This process has been repeated various times but still no success.

Can you please advise?

Kind Regards

Pages: [1]
anything