#Get CFrame of Part Via KeyFrame and Pose

53 messages · Page 1 of 1 (latest)

quick gulch
#

I have a 1 keyframe idle animation for a rig, and I want to be able to get the world position of a part (ie a tool) from the keyframe, as Poses hold CFrame data. I though I could just use :ToWorldSpace(), but It turns out that I forgot to factor in the c0 and c1 of the Motor6Ds. Im not the best with CFrames, so I have no idea how to do this. How can I get the CFrame of a part from a Keyframe object?

lean vale
#

Keyframe

#

as in like Animation keyframe?

#

You can get it by applying the animation

#

Then pausing it where you want the pose

#

Then you print the CFrame of each motor6d joint

#

CFrame.Position

#

Aswell as the rotation

#

Vector3.new(CFrame:ToEularYXZ())

#

something like that

quick gulch
#

unfortunetely I need it to work as a script ingame

#

i can get the animation keyframe via GetAnimationClipAsync(

lean vale
#

alr

#

so you need

#

the CFrame

#

thats all?

#

I might sound like lester but I will see what I can do

quick gulch
#

with all due respect i shall wait

lean vale
#

alright well the official roblox studio page says nothing about cframe as a property

#

however

#

there are KeyframeMarkers

#

Keyframe:GetMarkers()

#

Could that be something?

#

there are also :GetPoses()

#

Oh yeah

quick gulch
wintry rockBOT
#

studio** You are now Level 1! **studio

lean vale
#

:GetPoses() gives you the Motor6D

#

and then you get .CFrame on the pose

#

yup

#

those are the Motor6D positions

#

and rotations

quick gulch
lean vale
#

Rotation is radians so be careful

quick gulch
#

but idk how to factor in moto6d offsets via c0 and c1

lean vale
#

its motor6d btw

quick gulch
lean vale
#

its vertex not space

#

so

#

btw

#

are you trying to make r15 to r6 animations?

#

or r6 to r15?

quick gulch
#

wut

#

i just want the cframe worldposition

lean vale
#

oh

#

well you gotta apply the cframe to the appropriate motor6d

#

then you can get the world position

#

or do sin and cos math to do it automatically

#

I wouldnt do that its hell

#

and when I mean hell

#

dont waste your time with sin and cos rotation matrix