generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Collision Detection

Previous Thread :: Next Thread 
chaoticregandpledge is not online. chaoticregandpledge
Joined: 04 Dec 2009
Total Posts: 2894
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
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
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 is not online. 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
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
08 Nov 2013 10:10 AM
meanwhile, Oysi is probably working on Love2D 3D physics or some crazy bl0x like that
Report Abuse
SoftWinds is not online. 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 is not online. 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
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
08 Nov 2013 10:21 AM
^

he means for rotated GUIs which is way harder!!
Report Abuse
SoftWinds is not online. 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 is not online. 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
SCP087Project is not online. SCP087Project
Joined: 29 Sep 2013
Total Posts: 198
08 Nov 2013 01:10 PM
ROBLOX decied to filter my post so I decided to pastebin it.

pastebin/5tZjGyih
Report Abuse
SCP087Project is not online. SCP087Project
Joined: 29 Sep 2013
Total Posts: 198
08 Nov 2013 01:11 PM
ROBLOX decided*

derp floodcheck :l
Report Abuse
BetterBe is not online. 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 is not online. 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 is not online. Bassics
Joined: 24 Apr 2012
Total Posts: 415
09 Nov 2013 03:13 AM
o---o
|\ |
| \ |
| \|
o---o
Report Abuse
TheColorMan is not online. TheColorMan
Joined: 30 Jan 2010
Total Posts: 11228
09 Nov 2013 06:25 AM
Does this require linear algebra and vectors?

euclidean space .com anybody? ;-;
Report Abuse
Joe11Joe99 is not online. Joe11Joe99
Joined: 22 May 2011
Total Posts: 34458
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
chaoticregandpledge is not online. chaoticregandpledge
Joined: 04 Dec 2009
Total Posts: 2894
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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image