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: How to get all bordering parts of another part

Previous Thread :: Next Thread 
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
03 Nov 2017 03:19 PM
unfortunately the function Part:GetTouchingParts() only returns all of the parts that are inside of the given Part; What I need to figure out how to do is get all parts that are bordering the given Part (i.e. a surface of a Part is touching a surface the given Part), and I need to know which touching surface of each part is (i.e. its NormalId).

Is there a function for this? or are there any methods to accomplish this?
thanks
Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
03 Nov 2017 03:49 PM
bumpo bump bumpb umbpsdgfv help me
Report Abuse
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
03 Nov 2017 03:53 PM
You could create a slightly expanded Region3 and use FindPartsInRegion3;
http://wiki.roblox.com/index.php?title=API:Class/Workspace/FindPartsInRegion3

Then a bit of math and you can find your surfaces
Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
04 Nov 2017 11:27 AM
thanks @0supa

but someone please explain to me the kind of math i will need to use to determine bordering surfaces?
Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
04 Nov 2017 01:01 PM
bumppppppppppp
Report Abuse
chexyalani is online. chexyalani
Joined: 26 Mar 2017
Total Posts: 694
04 Nov 2017 01:07 PM
You don't need arithmetic for detecting parts in a region3.
Report Abuse
Quasiduck is not online. Quasiduck
Joined: 28 Sep 2008
Total Posts: 2437
04 Nov 2017 05:35 PM
Took a while. Put this in the part you want to get bordering parts for.

pasta
bin
/ZGzuB9CJ

My 3rd most complex script ever written...



pasta = paste
Report Abuse
Quasiduck is not online. Quasiduck
Joined: 28 Sep 2008
Total Posts: 2437
04 Nov 2017 05:49 PM
It can be slightly inaccurate if the two parts have a huge difference in size.
Report Abuse
Quasiduck is not online. Quasiduck
Joined: 28 Sep 2008
Total Posts: 2437
05 Nov 2017 08:50 AM
pasta
bin
/uzTre74H


Now 99.9% accurate. Fixed.

You'll notice that it creates a detector part.
Only all parts that are inside that detector part (not on the surface) will be detected.

The detector part is in the same position as the original part you want to test but is slightly bigger so that it detects the region "around" your original test part. (Your original test part is the part you want to see for which other parts are touching.)

This created detector part is invisible and non-collision so it won't be seen or felt.
However, it is also anchored and does not move with your original test part.
Report Abuse
MICHEAL1988351 is online. MICHEAL1988351
Joined: 26 Jan 2015
Total Posts: 582
05 Nov 2017 09:34 AM
thanks a lot quasi! im not very smart with vector product maths atm so i really appreciate your help.
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