Hello.
I am making a flight simulator and I am making controls for mobile using gyroscope. The output from gyroscope is a CFrame. How do I put a CFrame into Vector3? When I am trying to do so, everything is 0.
a CFrame consists of 2 vectors, for example;
1 | CFrame.new(Vector 3. new( 0 , 0 , 0 ), Vector 3. new( 0 , 0 , 0 )) |
the first vector determines the part's position and the second vector determines the part's orientation(where the part faces). To get a CFrame's position roblox has a neat function where you can type ".p" after a CFrame to get its position; for example,
1 | CFrame.new(Vector 3. new( 0 , 0 , 0 ), Vector 3. new( 0 , 0 , 0 )).p |
this should give you the position; hope i helped.