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: I know I might sound like a noob that ignores stickies, but...

Previous Thread :: Next Thread 
Tenal is not online. Tenal
Joined: 15 May 2011
Total Posts: 18684
07 Feb 2012 06:06 PM
[ Content Deleted ]
Report Abuse
xSIXxStorage is not online. xSIXxStorage
Joined: 22 Aug 2010
Total Posts: 1811
07 Feb 2012 06:07 PM
lol...
Report Abuse
matchlighter is not online. matchlighter
Joined: 11 Jun 2008
Total Posts: 347
07 Feb 2012 06:14 PM
Here ya go!

local x,y,z, R00,R01,R02, R10,R11,R12, R20,R21,R22 = beginFrame[pos].CFrameData:components()
local bx,by,bz, bR00,bR01,bR02, bR10,bR11,bR12, bR20,bR21,bR22 = v.CFrameData:components()
local Pos, R0, R1, R2 = Vector3.new(x,y,z):lerp(Vector3.new(bx,by,bz),pcent), Slerp(Vector3.new(R00,R01,R02), Vector3.new(bR00,bR01,bR02), pcent).unit, Slerp(Vector3.new(R10,R11,R12), Vector3.new(bR10,bR11,bR12), pcent).unit, Slerp(Vector3.new(R20,R21,R22), Vector3.new(bR20,bR21,bR22), pcent).unit

local nCF = CFrame.new(Pos.x,Pos.y,Pos.z, R0.x,R0.y,R0.z, R1.x,R1.y,R1.z, R2.x,R2.y,R2.z)

Don't forget to add the Slerp function
Report Abuse
Studionymous is not online. Studionymous
Joined: 07 Sep 2011
Total Posts: 186
07 Feb 2012 06:24 PM
@above are you some sort of cframe wizerd
Report Abuse
matchlighter is not online. matchlighter
Joined: 11 Jun 2008
Total Posts: 347
07 Feb 2012 06:30 PM
By no means. I just know that tools have the 4 Properties: GripPos, GripForward, GripUp, and GripRight. All are unit vectors except GripPos and all correlate to part of a CFrame. That was just a guess when I tried it, but it turned out to be right.
Report Abuse
sharky99 is not online. sharky99
Joined: 18 Dec 2008
Total Posts: 3364
07 Feb 2012 06:32 PM
@Studionymos
Not to puff my self up but...
You all should know that IM the CFrame wizard. After all, I made the best masterhand on roblox that few people have seen!
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
07 Feb 2012 06:41 PM
@Matchlighter

By the way, that only works because Roblox "fixes" CFrames that aren't quite right for you. Also, it will still fail in some edge cases.
Report Abuse
Studionymous is not online. Studionymous
Joined: 07 Sep 2011
Total Posts: 186
07 Feb 2012 06:42 PM
sharky i was just about to post masterhand source and be like "oh this stupid thing" but roblox filter blocked it -.- qq preparing for ban
Report Abuse
matchlighter is not online. matchlighter
Joined: 11 Jun 2008
Total Posts: 347
07 Feb 2012 07:51 PM
@stravant

What do you mean "aren't quite right"? Is it a potential issue? And what do you mean by "edge cases"?
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
07 Feb 2012 08:29 PM
I'm not quite sure. I was thinking of you doing a lerp of the unit vectors, not a slerp, it may work that way.
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
07 Feb 2012 09:08 PM
Doesn't an arc defeat the purpose of linear if the arc isn't bi-polar? Just curious.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
07 Feb 2012 11:59 PM
Well, you can still do linear interpolation in an arc. It's just that you're doing linear interpilation of the angle which is the fraction of the way through the arc, rather than distance of the way long a line.
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
08 Feb 2012 12:23 AM
That's true, but the arc must be a line segment on a geodesic.
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
08 Feb 2012 07:22 AM
I think someone said it wouldnt work properly even with slerp if you rotate on more than 2 (3???) axises at once.

In theory it works when rotating on a single axis, and in practise it works on 2 and 3 axises too (but not in theory lolo)
Report Abuse
BINARYTESTLAB is not online. BINARYTESTLAB
Joined: 05 Nov 2010
Total Posts: 37
08 Feb 2012 09:47 AM
@sharky99

RobloxMasterDX made that

I want to say froob now
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
08 Feb 2012 01:22 PM
> What do you mean "aren't quite right"? Is it a potential issue?

I see what he means. Consider the CFrames:

    CFrame.new(0, 0, 0
        1, 0, 0,
        0, 1, 0
        0, 0, 1
    )

and

    CFrame.new(0, 0, 0
        0, 1, 0,
        0, 0, 1
        1, 0, 0
    )

The second is a rotation of the first by 120 degrees about the x=y=z line. If you do a (slerped) interpolation by 0.5, you'll end up with:

    CFrame.new(0, 0, 0
        0.707, 0.707, 0,
        0, 0.707, 0.707,
        0.707, 0, 0.707
    )

However, this is no longer an orthogonal CFrame, since the axes are not perpendicular to one another.

-------------------------------------------

As mentioned already, Roblox does try to orthogonalize CFrames when they are applied to parts.

 
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
08 Feb 2012 09:17 PM
It's a shame that Roblox does orthogonalize CFrames. I want to do some wonky shearing.
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