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: Newish utility functions

Previous Thread :: Next Thread 
XlegoX is not online. XlegoX
Joined: 16 Jun 2008
Total Posts: 14955
15 Dec 2009 09:15 PM
tuple CFrame::components(void)
-----------
Returns the individual numbers in the matris that makes up a CFrame
EG:
tb = {CFrame.new(3, 4, 5):components()}
for i = 1, 12 do
print(i, "=", tb[i])
end

Vector3 Ray::ClosestPoint(Vector3)
------------
Returns the closest point on the ray to point specified
EG:
ray = Ray.new(Vector3.new(0,0,0),Vector3.new(0, 1, 0))
point = Vector3.new(20, 5, 10)
print(ray:ClosestPoint(point)) --> 0, 5, 0

number Ray::Distance(Vector3)
-----------
Returns the closest distance from a point to a ray

Vector3 Vector3.FromNormalId( ? )
-----------
constructs a vector3 representing a certain face


CFrame CFrame.Angles(number, number, number)
---------
Same as CFrame.fromEulerAnglesXYZ but a far less verbose timesaver

tuple CFrame::toEulerAnglesXYZ()
--------
returns a "best guess" of eulerangles that could have been used to construct the CFrame
EG:
x, y, x = CFrame.new().toEulerAnglesXYZ()
print(x, y, z)
Report Abuse
TheEndOfDays is not online. TheEndOfDays
Joined: 24 Nov 2009
Total Posts: 2614
15 Dec 2009 09:20 PM
explain FromNormalId() more please
Angles will help me alot,i ALWAYS misspell it >.>
Report Abuse
XlegoX is not online. XlegoX
Joined: 16 Jun 2008
Total Posts: 14955
15 Dec 2009 09:29 PM
See the '?'

That's because I can't get it to work =P
Report Abuse
bloccoGUIs is not online. bloccoGUIs
Joined: 15 Nov 2009
Total Posts: 361
15 Dec 2009 09:29 PM
@xLEGOx:

So... how do you find this stuff? Since __index isn't a table...
Report Abuse
TheEndOfDays is not online. TheEndOfDays
Joined: 24 Nov 2009
Total Posts: 2614
15 Dec 2009 09:31 PM
H4XXXing the roblox uploader file?
Report Abuse
gaius19 is not online. gaius19
Joined: 03 Aug 2009
Total Posts: 3159
15 Dec 2009 09:38 PM
Vector3.FromNormalId(Enum.NormalId.Front)
Vector3.FromNormalId(Enum.NormalId.Back)
Vector3.FromNormalId(Enum.NormalId.Left)
Vector3.FromNormalId(Enum.NormalId.Right)
Vector3.FromNormalId(Enum.NormalId.Top)
Vector3.FromNormalId(Enum.NormalId.Bottom)
Report Abuse
Anaminus is not online. Anaminus
Top 100 Poster
Joined: 29 Nov 2006
Total Posts: 5945
15 Dec 2009 09:40 PM
Use a NormalId enum with FromNormalId. It returns a Vector3 of the corresponding face.

Vector3.FromNormalId(Enum.NormalId.Top) --> 0, 1, 0


Edit: Haha, late as usual.
Report Abuse
TheEndOfDays is not online. TheEndOfDays
Joined: 24 Nov 2009
Total Posts: 2614
15 Dec 2009 09:46 PM
oh,thanks for rubbing the Edit: power in our faces >:[

so this would make Pathfinding easyer?
Report Abuse
GoldenUrg is not online. GoldenUrg
Joined: 23 Aug 2009
Total Posts: 6428
15 Dec 2009 10:22 PM
Can you put these on the wiki instead of just in a forum post? And while you're at it add the "oldish" missing ones too?
Report Abuse
tuquan is not online. tuquan
Joined: 14 Jun 2008
Total Posts: 9458
15 Dec 2009 11:28 PM
So did you test this or what?
Report Abuse
Bonecuss is not online. Bonecuss
Joined: 15 Feb 2008
Total Posts: 6979
16 Dec 2009 09:58 AM
! The faces thing will help me a lot, I gotta remember that.
Report Abuse
spiff678 is not online. spiff678
Joined: 02 Mar 2007
Total Posts: 172
16 Dec 2009 01:56 PM
Nice. When did thi stuff come out? Today?
Report Abuse
VoidWhisperer is not online. VoidWhisperer
Joined: 26 Apr 2008
Total Posts: 14666
16 Dec 2009 02:27 PM
Ana, does it return the direction the face is looking, or the position of where the face is o.O?
Report Abuse
gombob is not online. gombob
Joined: 01 May 2008
Total Posts: 5215
16 Dec 2009 03:05 PM
It's just always the same...
Report Abuse
MtlMario64 is not online. MtlMario64
Joined: 23 Jan 2009
Total Posts: 2633
16 Dec 2009 03:27 PM
I dont see a point in the FromNormalId... It just returns 1 in a direction corresponding with the Id you chose...
Report Abuse
Weaselman50 is not online. Weaselman50
Joined: 23 Nov 2007
Total Posts: 1599
16 Dec 2009 03:40 PM
It's so you don't have to do it yourself when using the Handles object or something similar. All I know is I remember I had to make my own function for it.
Report Abuse
bloccoGUIs is not online. bloccoGUIs
Joined: 15 Nov 2009
Total Posts: 361
16 Dec 2009 04:31 PM
Uhmm... xLEGOx practically ignores me now... -__-
Report Abuse
billiland is not online. billiland
Joined: 11 Nov 2008
Total Posts: 4018
16 Dec 2009 04:38 PM
He doen't ignore you. He just doesn't have an responce worth saying most likly.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
16 Dec 2009 04:40 PM
:O
The faces this should fix my planetary gravity design!
:D
Report Abuse
bloccoGUIs is not online. bloccoGUIs
Joined: 15 Nov 2009
Total Posts: 361
16 Dec 2009 04:44 PM
WELL THERE HAS TO BE A WAY TO GET THEM!!!
Report Abuse
bloccoGUIs is not online. bloccoGUIs
Joined: 15 Nov 2009
Total Posts: 361
16 Dec 2009 04:45 PM
Sorry, that was at bill and or xLeg, not you Blue.

:3
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
16 Dec 2009 04:45 PM
I find out about fromNormalID after I've spent weeks working on ways to use lookVector to do it... Great...
Report Abuse
MtlMario64 is not online. MtlMario64
Joined: 23 Jan 2009
Total Posts: 2633
16 Dec 2009 04:47 PM
I forgot how to set rays... Is it two points or point and direction?
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
16 Dec 2009 04:58 PM
@mtlmario64
A point and a vector. But there's really no point to using a ray right now. =/
Report Abuse
bloccoGUIs is not online. bloccoGUIs
Joined: 15 Nov 2009
Total Posts: 361
16 Dec 2009 05:33 PM
Ray.new(v1, v2).Direction
Ray.new(v1, v2).Origin
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