Grozz Posted March 21, 2018 Share Posted March 21, 2018 I need a function that calculates ped's bone matrices. (bone_attach functions doesn't work) I'm working on a shader that actually can move a ped's bone. Link to comment
Ren_712 Posted March 21, 2018 Share Posted March 21, 2018 You will find more explanation on element 4x4 matrix here: https://wiki.multitheftauto.com/wiki/GetElementMatrix First 3 rows require: right, up, forward vectors. Fourth will be position. You can provide right and forward, and up will be cross product of the two. You can also create matrix provided 3 points in 3d space. And that is essentially what bone_attach does. The code is fairly easy to understand: hint: getMatrixFromPoints function in bone_pos_rot.lua Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now