Part bank angle/ X axis rotation

WHAT IM ATTEMPTING

To get the bank angle/ the x axis rotation of a part, instead of its whole rotation.

.
INFO

Ive tried using Cframe.LookVector, but doesnt result in what i would like.
If anyone could just let me know a way to do this, it would be lovely.

1 Like

could you show us some screenshots and code on what your trying to attempt. its not clear what you mean with bank angle .

You can use the CFrame matrix and derive these angles. There used to be a great article on this but it has since been removed from the wiki.

local CFrame=part.CFrame
local m10,m11=select(7,CFrame:components())
local bank=math.atan2(m10,m11)
print(math.deg(bank))

After a bit of googling I discovered this article which explains it in more detail.

4 Likes

Thank you! Also might have gotten a bit inspired by your UI, hope you dont mind this ui im using for my planekit.

Looks nice dont worry, inspiration is fine and important. I too am inspired by many other works!

2 Likes