1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 13 Jul 2011 02:36 PM |
| Is there any way to find which handle is being dragged (Top bottom front back left right)? |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 02:39 PM |
| http://wiki.roblox.com/index.php/MouseDrag_%28Event%29 |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 13 Jul 2011 02:41 PM |
| That doesn't tell me anything. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 02:51 PM |
| Look at the first argument. -.- |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 13 Jul 2011 05:15 PM |
| The first argument doesn't tell me which handle is being dragged. It only tells me the unit vector of the position of the handle relative to the position of the adornee. That's not what I want to know. |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
| |
|
Anaminus
|
  |
 |
| Joined: 29 Nov 2006 |
| Total Posts: 5945 |
|
|
| 14 Jul 2011 05:12 AM |
It is what you want to know.
[[ local FaceFromVector = { [Vector3.FromNormalId(Enum.NormalId.Back)] = Enum.NormalId.Back; [Vector3.FromNormalId(Enum.NormalId.Bottom)] = Enum.NormalId.Bottom; [Vector3.FromNormalId(Enum.NormalId.Front)] = Enum.NormalId.Front; [Vector3.FromNormalId(Enum.NormalId.Left)] = Enum.NormalId.Left; [Vector3.FromNormalId(Enum.NormalId.Right)] = Enum.NormalId.Right; [Vector3.FromNormalId(Enum.NormalId.Top)] = Enum.NormalId.Top; } ]] |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 14 Jul 2011 01:11 PM |
| I tried dissecting CmdUtl to figure it out, but I didn't feel like going back and reading all of the tables after I found the place where it actually resizes... I'll try to make it work again :/ |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 14 Jul 2011 01:36 PM |
Rotation still screws everything up. :/
handles.MouseDrag:connect(function(face, dist) local L = selected.Size selected.Size = selected.Size + Vector3.FromNormalId(face)*(dist-pDist) selected.CFrame = selected.CFrame - Vector3.new(selected.Size-L)/2 end) |
|
|
| Report Abuse |
|
|