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

Author Topic: Collision and moving depends on collision point  (Read 6650 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Collision and moving depends on collision point
« Reply #15 on: December 26, 2010, 07:15:26 pm »
Quote
Should I pack that collision area into shape and then do sfShape_TransformToGlobal?

Why?
Laurent Gomila - SFML developer

darekg11

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Collision and moving depends on collision point
« Reply #16 on: December 26, 2010, 07:20:53 pm »
I think it works pretty good, I will post in like 2 minutes graph how it detectes angles and tell me if it detect right.

darekg11

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Collision and moving depends on collision point
« Reply #17 on: December 26, 2010, 08:56:38 pm »
This si how it detects angles at most important point of colliding:


Please tell if it's right.

BTW: How can I make quick test with over 100 objects placed in different places and of different size? Take some big black rectangle then randomize values and setting them to SubRects of that rectangle and then again randomize values and place subrects at that randomize values?

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Collision and moving depends on collision point
« Reply #18 on: December 29, 2010, 08:35:31 pm »
Quote from: "darekg11"
Oh yeah, damn it was simple x_x
So it shoud looks like:


And if Angle will be over or below certain values then I decide where I can move, right? Damn thank You, I was thinking about somethign like this but I was not sure how it should look.

On regular I am patient guy ;) Happy Christmas by the way, lol.

P.S How to calculate it? Well probably i will find it on google so.


Hey can you help me with collision? skype is TTT_Dutch