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

Author Topic: sf::String : how to check collision  (Read 2204 times)

0 Members and 1 Guest are viewing this topic.

langisser

  • Newbie
  • *
  • Posts: 9
    • View Profile
sf::String : how to check collision
« on: January 11, 2010, 06:37:24 am »
I have text create by sf::String and I want check collision between text.
But "Simple Collision Detection" on Wiki use for sf::Sprite.
How to use "Simple Collision Detection"  on Wiki  for sf::String.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
sf::String : how to check collision
« Reply #1 on: January 11, 2010, 01:18:41 pm »
You can use both functions
Code: [Select]
sf::String::GetRect()and
Code: [Select]
sf::FloatRect::Intersects()
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

langisser

  • Newbie
  • *
  • Posts: 9
    • View Profile
sf::String : how to check collision
« Reply #2 on: January 12, 2010, 05:54:52 am »
Thank a lot.
It's work for me
Code: [Select]
a.GetRect().Intersects(b.GetRect())