|
| 25 Dec 2015 05:18 PM |
| How would I detect if two parts were physically overlapping like the event wouldn't fire if the bricks were only touching just if they were overlapping |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 25 Dec 2015 07:54 PM |
| Use changed as your listener and compare wat u need |
|
|
| Report Abuse |
|
|
| |
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 25 Dec 2015 08:50 PM |
Do they have to be completely overlapping, or just a little bit?
You could do something that checks the X and Z positions, and ignores the Y. |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2015 08:53 PM |
| just a little bit and yeah i know i could use positioning but that seems very tedious and i was just wondering if anyone knew another way |
|
|
| Report Abuse |
|
|
Daftcube
|
  |
| Joined: 10 Jan 2010 |
| Total Posts: 275 |
|
|
| 25 Dec 2015 09:17 PM |
| I had this same problem. You can check out my update thread here: http://forum.roblox.com/Forum/ShowPost.aspx?PostID=180223221 |
|
|
| Report Abuse |
|
|
| |
|
Daftcube
|
  |
| Joined: 10 Jan 2010 |
| Total Posts: 275 |
|
|
| 25 Dec 2015 09:34 PM |
| No problem! Don't forget to check out the original thread too. There are some cool API functions to learn about in there! |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2015 09:36 PM |
basePart:GetTouchingParts() basePart:GetConnectedParts() |
|
|
| Report Abuse |
|
|
| |
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 25 Dec 2015 10:03 PM |
function partInPart(p1, p2) return math.abs(p2.CFrame:pointToObjectSpace(p1.CFrame.p).x) <= p2.Size.x/2 and math.abs(p2.CFrame:pointToObjectSpace(p1.CFrame.p).y) <= p2.Size.y/2 and math.abs(p2.CFrame:pointToObjectSpace(p1.CFrame.p).z) <= p2.Size.z/2 end |
|
|
| Report Abuse |
|
|