EvanHolt
|
  |
| Joined: 06 Sep 2008 |
| Total Posts: 1264 |
|
|
| 24 Feb 2017 09:21 PM |
| How would I go about rotating a part so that its ################# is equal to the vector Vector3.new(a,b,c)? (a, b, and c are arbitrary numbers) |
|
|
| Report Abuse |
|
|
EvanHolt
|
  |
| Joined: 06 Sep 2008 |
| Total Posts: 1264 |
|
|
| 24 Feb 2017 09:22 PM |
| That censored section is: CFrame [period] ########## [ George Orwell taught me math! 2 + 2 = 5 ] |
|
|
| Report Abuse |
|
|
EvanHolt
|
  |
| Joined: 06 Sep 2008 |
| Total Posts: 1264 |
|
|
| 24 Feb 2017 09:22 PM |
And that other censored section is look Vector without the space.
[ George Orwell taught me math! 2 + 2 = 5 ] |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 24 Feb 2017 09:23 PM |
| Assuming the hashes are about setting a part's lookVector, then you have an under defined problem as infinitely many cframes can have the same lookVector |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2017 09:25 PM |
I think he means he wants to specify three values and have the CFrame value adjusted?
|
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 24 Feb 2017 09:28 PM |
This is the part where I repeat the same thing.
If we set the constraint that part's local x-axis should always be coplanar with the global x-z plane, then you can do this:
part.CFrame = CFrame.new(part.Position, part.Position+Vector3.new(a,b,c)) |
|
|
| Report Abuse |
|
|
EvanHolt
|
  |
| Joined: 06 Sep 2008 |
| Total Posts: 1264 |
|
|
| 24 Feb 2017 09:35 PM |
"part.CFrame = CFrame.new(part.Position, part.Position+Vector3.new(a,b,c))" This does exactly what I needed to do, thanks! Sorry if my question was poorly worded.
[ George Orwell taught me math! 2 + 2 = 5 ] |
|
|
| Report Abuse |
|
|