![]() ![]() local offset= needle.Position - base. ![]() You’ll need to store offset, so calculate it at the start only. local newCFrame = CFrame.new(base.Position+originalOffset) * offsetCFrame:Inverse() * rotCFrame * offsetCFrame Note that this is a global rotation around the axis setting the rotation to X should result in the same CFrame (instead of incrementing). Local rotCFrame = omEulerAnglesXYZ(rot)Īnd then, with some math and these values, we can rotate around the point. ![]() Local rot = Vector3.new(0,0,math.rad(angle)) You’ll need to add a rotation, which can take a Vector3 as input, but as you want to lock it to 1 axis (i assume) you can also just make it a number. local offset= needle.Position - base.Position Then, to calculate the needle’s CFrame at a specific angle, you do some math with the offset. 3Open by clicking 'Create Figure Type' in the main windows File menu8 Positioning FiguresPose and MovementA stick figure consists of 'segments' (lines, circles or images) connected by pivoting joints. Set the pivot to the rotation origin, and then just use model:PivotTo().Īlternatively, using CFrames, you store the original offset (that is to say, needle.Position - base.Position). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |