Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 05 Feb 2013 12:15 AM |
I have been experimenting and I can't find an algorithm that I can think of that can detect when one TextLabel overlays another. The reason I'm asking is because I'm making a game much similar to the 2D game, Space Invaders. I have already made the spaceship and pellets working but I need to know how to tell when one TextLabel overlays so it mocks when the bullet hits the little orb to give you one point.
If you can help, please reply; if not go away.
[ Content Trolled by Sorcus ] |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2013 12:57 AM |
| You need to make your own using *dun dun dun* MATH! :O |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2013 01:04 AM |
ZIndex.
-- i liek pineapples. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2013 01:07 AM |
I know a way. But it's kinda hard to explain.
-- i liek pineapples. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2013 02:44 AM |
| Main way is checking by size and position whether it overlaps. |
|
|
| Report Abuse |
|
|
thane1326
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 867 |
|
|
| 05 Feb 2013 04:00 AM |
You can use math to figure out the area taken up by the gui.
Yregion = Gui.Position.Y.Scale + Gui.Size.Y.Scale Xregion = Gui.Position.X.Scale + Gui.Size.Z.Scale
Then check is one is in another's region. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2013 09:05 AM |
| http://wiki.roblox.com/index.php/Collision_detection_for_GUI%27s |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 05 Feb 2013 09:27 AM |
@Free, thanks I don't know why I didn't check the wiki first; as I am a wiki writer lol
[ Content Trolled by Sorcus ] |
|
|
| Report Abuse |
|
|