|
| 08 Nov 2013 06:13 AM |
I realize that this isn't scripting helpers, but I sincerely doubt that the "regulars" there would be able to help, at least not as fast and as detailed as the people in this forum could.
Now for the question: How would you detect GUI collision between rotated GUIs? |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 06:27 AM |
No idea.
Collision detection can be difficult on its own. With rotatable guis, I don't even know. |
|
|
| Report Abuse |
|
|
Aerideyn
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 1882 |
|
|
| 08 Nov 2013 07:18 AM |
Research something called the "Separating axis theorem" It works for convex shapes only - which Gui's are :p
|
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 10:10 AM |
| meanwhile, Oysi is probably working on Love2D 3D physics or some crazy bl0x like that |
|
|
| Report Abuse |
|
|
SoftWinds
|
  |
| Joined: 27 Feb 2010 |
| Total Posts: 730 |
|
|
| 08 Nov 2013 10:17 AM |
There is an article on the Wiki. You should've check there first...
http://wiki.roblox.com/index.php/Collision_detection_for_GUIs
~Success is binary, you're either a one or a zero. There is no second place.~ |
|
|
| Report Abuse |
|
|
YEGGOR
|
  |
| Joined: 02 Apr 2013 |
| Total Posts: 1150 |
|
|
| 08 Nov 2013 10:21 AM |
@soft
He's asking for rotated gui detection :P |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 10:21 AM |
^
he means for rotated GUIs which is way harder!! |
|
|
| Report Abuse |
|
|
SoftWinds
|
  |
| Joined: 27 Feb 2010 |
| Total Posts: 730 |
|
|
| 08 Nov 2013 10:30 AM |
Ok don't expect a tutorial for that any time soon! :P
~Success is binary, you're either a one or a zero. There is no second place.~ |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 08 Nov 2013 10:32 AM |
| @Above seperating axis theorem - plenty of tutorials online, you just need to port the code over. |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 01:10 PM |
ROBLOX decied to filter my post so I decided to pastebin it.
pastebin/5tZjGyih |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 01:11 PM |
ROBLOX decided*
derp floodcheck :l |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 08 Nov 2013 11:29 PM |
Okay lets redo this Whole reply chain. Im going to describe to you how GUI Collision Works.
It all comes down to math with AbsolutePosition and AbsoluteSize.
Lets take the X-Side and Positioning for example.
if Gui.AbsolutePosition.X <= Gui2.AbsolutePosition.X + Gui.AbsoluteSize.X then Gui.Position = UDim2.new(0, Gui.AbsolutePosition.X +((Gui2.AbsolutePosition.X + Gui.AbsoluteSize.X) - Gui.AbsolutePosition.X), 0, 0) else end
which translates to: if the Position of GUI on the X Axis is Less than The Right Side of Gui2, then reform the Position (X Offset, not AbsolutePosition) to add to its X with the Difference of the Right Side Add-Ons (aka Gui2.AbsolutePosition.X + Gui2.AbsoluteSize.X [Again Right Side of Gui]) to get back on the right side of the Gui.
Wheres my credibility?
this is my 2D game engine i scrapped: http://www.roblox.com/A-Muscular-Stick-Mans-Quest-place?id=134233126
|
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 08 Nov 2013 11:34 PM |
However IF you are indeed talking about Rotational Guis the fact of the matter is that Roblox needs to make Better Read-Only Properties for GUIs Such as Region2.
we also need better method if we want to do this for rotational GUIs like :Overlap() Detection, and ToObjectSpace for GUIs to get the Objects individual Axis, Another Helpful one would be :GetPerameters() to help with Side angle Comparisons between different GUIs to help a player make a Collision Detectable while on a Slant. |
|
|
| Report Abuse |
|
|
Bassics
|
  |
| Joined: 24 Apr 2012 |
| Total Posts: 415 |
|
| |
|
|
| 09 Nov 2013 06:25 AM |
Does this require linear algebra and vectors?
euclidean space .com anybody? ;-; |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2013 07:29 AM |
hmm
if blah.CFrame.Y > ew.CFrame.Y then
something like that
Odnarb will RULE - http://web.roblox.com/Forum/ShowPost.aspx?PostID=114315214 |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2013 07:47 AM |
| I have received a few good replies pointing me towards the Separating Axis Theorem, and I appreciate that. On the other hand, there are those few people that insist upon reading the title and going straight to posting a response. I KNOW how to detect GUI collision between two non-rotated GUIs-but that's not the point of this post. |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 09 Nov 2013 08:55 AM |
@BetterBe Except your engine is pretty buggy, as I was going through GUI elements. |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 09 Nov 2013 02:34 PM |
| it wasnt buggy before roblox made a update yesterday. Also, the Bugs would be fixed right now if i didnt scrap the project (because it was a mod i made to a Falling Mechanic that causes most of the bugs) |
|
|
| Report Abuse |
|
|