McBlocker
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 1721 |
|
|
| 01 May 2012 05:44 PM |
| Probably not, but I'm just making sure. |
|
|
| Report Abuse |
|
|
tofwap
|
  |
| Joined: 06 Dec 2007 |
| Total Posts: 6596 |
|
|
| 01 May 2012 05:45 PM |
part.Touched ?
Of course you could also do raycasting and all that fancy stuff. |
|
|
| Report Abuse |
|
|
|
| 01 May 2012 05:53 PM |
| You could like get teh direction it's travelling at he time of collision and do some fancy math mumbo jumbo to detect approximately where it hit :O |
|
|
| Report Abuse |
|
|
McBlocker
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 1721 |
|
|
| 01 May 2012 05:55 PM |
This maybe?
Assuming that radius = part.Size/2 and that the part is a ball...
part.Touched:connect(function(hit) touchVector = hit.Position + hit.CFrame:pointToObjectSpace(part.Position) if touchVector.X<0 then touchVector = touchVector + Vector3.new(radius,0,0) else touchVector = touchVector + Vector3.new(-radius,0,0) end if touchVector.Y<0 then touchVector = touchVector + Vector3.new(0,radius,0) else touchVector = touchVector + Vector3.new(0,-radius,0) end if touchVector.Z<0 then touchVector = touchVector + Vector3.new(0,0,radius) else touchVector = touchVector + Vector3.new(0,0,-radius) end print(touchVector) end) |
|
|
| Report Abuse |
|
|
McBlocker
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 1721 |
|
| |
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 06 May 2012 08:51 AM |
I think you can detect which side it touched.
- Cheers! |
|
|
| Report Abuse |
|
|