|
| 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 |
|
|
| |
|
| |
|
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 |
|
|
|
| 16 Oct 2012 08:22 PM |
Uh No...
I need help with the maths involved not the scripting itself. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 17 Oct 2012 01:21 PM |
| But how would you do it with velocity, not cframe? |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
| |
|