|
| 07 Aug 2016 02:28 PM |
CFrame.fromAxisAngle(Vector3 v, number r)
from the wiki, you can only input the axis and the rotation.
how do you input a second vector that's getting rotated around the axis? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2016 02:38 PM |
Use another. I mean, there's surely another way that I don't know about to get the correct vector to rotate on both axes, but it's easier to use and understand this way. CFrame.fromAxisAngle(Blah) * CFrame.fromAxisAngle(Blah)
|
|
|
| Report Abuse |
|
|
|
| 07 Aug 2016 02:38 PM |
| i mean, how do you get the second vector thats getting rotated? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2016 02:39 PM |
There is no second vector though? You're only rotating on one vector.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Aug 2016 02:39 PM |
if you want to rotate 2 vectors it's done like this
.fromAxisAngle(Vector3.new(1,0,1).unit,r
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2016 02:41 PM |
But that's still only one vector. Again, you could do math to find out the vector between them I'm sure, but then your rotations might be askew depending on what you wanted.
|
|
|
| Report Abuse |
|
|
|
| 07 Aug 2016 02:42 PM |
oh my wording was wrong
if you want to rotate 2 axes at once it's what i said
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2016 02:46 PM |
let me re-clarify what im asking it was kinda misleading lol
i thought that when you use fromaxisangle there's an axle vector that stays still, then there's another vector that gets rotated AROUND that axle vector.
what i want to know is how do you input that vector (that gets rotated) and how do you get the after vector (After it gets rotated) because the constructor on the wiki doesn't have a place where you input that vector |
|
|
| Report Abuse |
|
|
VoidFrost
|
  |
| Joined: 14 Oct 2011 |
| Total Posts: 1188 |
|
|
| 07 Aug 2016 02:47 PM |
| what does fromaxisangle do |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Aug 2016 03:53 PM |
The fromAxisAngle constructor only changes the rotation matrix. If you want a pure vector implementation check out this:
http://wiki.roblox.com/index.php?title=User:EgoMoose/Articles/Quaternions_and_slerping#Rodriguez_Rotation_formula:_Axis-angle_rotations |
|
|
| Report Abuse |
|
|
| |
|