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 » Scripting Helpers
Home Search
 

Re: Handles

Previous Thread :: Next Thread 
1waffle1 is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
13 Jul 2011 02:39 PM
http://wiki.roblox.com/index.php/MouseDrag_%28Event%29
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
13 Jul 2011 02:41 PM
That doesn't tell me anything.
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
13 Jul 2011 02:51 PM
Look at the first argument. -.-
Report Abuse
1waffle1 is not online. 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 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
14 Jul 2011 02:45 AM
Bump
Report Abuse
Anaminus is not online. Anaminus
Top 100 Poster
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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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