|
| 30 Apr 2016 10:28 AM |
I want to know what the x,y,z components would be given a CFrame.
Ex: I got a vector v1 = (0,1,0) I got a brick looking up, meaning the lookvector of the bricks cframe is (0,1,0) Then in the bricks cframe-cordinate, vector v1 is (1,0,0)
I'v tried all of the following: CFrame:pointToWorldSpace(Vector3 v3) CFrame:pointToObjectSpace(Vector3 v3) CFrame:vectorToWorldSpace(Vector3 v3) CFrame:vectorToObjectSpace(Vector3 v3)
None of them gave any resonable results. Any idea what I'm doing wrong? |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 10:32 AM |
| Really poorly explained but I hope someone get the point. |
|
|
| Report Abuse |
|
|
Marienus
|
  |
| Joined: 02 Jul 2012 |
| Total Posts: 118 |
|
|
| 30 Apr 2016 10:32 AM |
CFrame.new(v3.X,v3.Y,v3.Z) ?
I don't really know what you are trying to do though. |
|
|
| Report Abuse |
|
|
ray_1
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 464 |
|
|
| 30 Apr 2016 10:33 AM |
not sure what you are trying to do clarify?
Recommended username: PossessiveRay_1
|
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 30 Apr 2016 10:37 AM |
local p = Vector3.new(1,0,0) local lookVector = Vector3.new(0,1,0) local z = -lookVector
CFrame.new( p.x,p.y,p.z, x.x,y.x,z.x, x.y,y.y,z.y, x.z,y.z,z.z )
For a complete CFrame you have to define x or y (and the over can be solved for)
This said, I'm not sure what you're asking//trying to do as you haven't exactly specified what you're calling a reasonable result. |
|
|
| Report Abuse |
|
|
| |
|