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.


Messages - NinjaCat

Pages: [1]
1
Thanks for the replies, I will try the vector method.

But I made it a bit unclear.. I don't need it to be physically accurate, it's just so they don't overlap. The sprites should probably bounce the same amount (needed for the collision to end). Anyway, thanks for the suggestions, I'll get to work now  :)

EDIT: The vector solution worked perfectly, though I had to reduce the size of the vector, since it was moving the sprites too far away.

2
Hello, I'm quite new to SFML, but as far as I've searched, I had no luck finding people with a similar problem.

Anway, I have a group of sprites moving towards another single sprite. Everything works fine, but they stack on top of each other.

So I made some collision checking, and it would work fine, if I wanted for the sprites to stop moving completely, when colliding. I'm trying to make them walk/bounce away from each other when they get too close, while not stopping the movement towards their target.

If there any way of achieving this in an uncomplicated manner?

(I've managed to get similar results(by bouncing them in a direction, opposite/left/right of the movement direction), but the group of sprites would occasionally "teleport" between each other.)

Pages: [1]