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: Having a brick rotate depending on its rotation

Previous Thread :: Next Thread 
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
16 Oct 2012 08:00 PM
I want this brick to rotate (Not cframe, rotvelocity, maybe?) to the left, right, front, back, but only relative to the brick itself.
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
16 Oct 2012 08:08 PM
Help
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
16 Oct 2012 08:19 PM
:l
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Oct 2012 08:21 PM
maybe:

if Part.CFrame.Angles == BLAH then
BLAG
end

??
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
16 Oct 2012 08:22 PM
Uh
No...

I need help with the maths involved not the scripting itself.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Oct 2012 08:23 PM
lol sin/cos/etc ?? idk
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
16 Oct 2012 08:26 PM
That has to do with circles and stuff. I dont think there are any circles-ish stuff involved in this :P
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Oct 2012 08:26 PM
i have no clue about sin and cos, so my bad ;]
Report Abuse
noobertuber is not online. noobertuber
Joined: 16 Jan 2007
Total Posts: 2321
16 Oct 2012 09:14 PM
What are you trying to do? Are you trying to make the brick rotate around an axis that is not at the center of the brick? Could you please explain further.

-God Bless-
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
17 Oct 2012 05:35 AM
Like say the brick is a vehicleseat, the brick will always rotate up in the direction the player is facing, and doing a barrel roll to the right will always be to the right no matter if you're facing backwards or whatever.

I'm not good at explaining things.
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
17 Oct 2012 06:09 AM
You mean MOVING things dependig on their rotation?

Use lookvector, CFrame*CFrame.Angles and CFrame*CFrame math
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
17 Oct 2012 06:13 AM
as in moving something to the left(as in his rotation) would look something like =

HIS.CFrame = HIS.CFrame*CFrame.new(-1,0,0)

to the right =

HIS.CFrame = HIS.CFrame*CFrame.new(1,0,0)

up =

HIS.CFrame = HIS.CFrame*CFrame.new(0,1,0)

down =

HIS.CFrame = HIS.CFrame*CFrame.new(0,-1,0)

forward =

HIS.CFrame = HIS.CFrame*CFrame.new(0,0,1)

backward =

HIS.CFrame = HIS.CFrame*CFrame.new(0,0,-1)
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
17 Oct 2012 01:21 PM
But how would you do it with velocity, not cframe?
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2012 01:23 PM
Use an angular velocity.
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