1
$\begingroup$

The bone in between the front wheels is following a Bezier curve (black) and the whole mesh of the forklift (all in one object) follows. I need the motion paths of the wheels (more precice of the wheel bones) as a curve!

Reason:

I want to make the wheel bones follow that curve and point in the direction of movement (for correct steering) and further make them rotate along this curve with a driver. I want to unparent the wheel bones from the root and move them independently on their paths but in sync with the rest of the moving mesh.

Stuff thats not working:

  • I already tried to make the rear wheels steer by IK constraints and a driver bone which reads information of the bezier curve in front of the forklift but that does not do the job for me, since the radii of the Bezier curves I want the bone between the front wheels to follow are to narrow/ cover a too large range of radii.

  • I just can not bing this script to run. Perhaps somebody can explain how I do this step by step?

  • Btracer addon - I could'nt figure out how to follow the path of a bone which is parentet to another bone which is following another path (wheel bone)

  • The Motion Trails Addon isn't maintained anymore - not working on 2.8

Please help, I'm crying. The data is there in front of my eyes but blender does not allow me to use it

Text

$\endgroup$
1

2 Answers 2

0
$\begingroup$

My good Buddy ClockMender has an excellent tutorial on this. \

$\endgroup$
2
  • $\begingroup$ The problem getting the motion path into a curve still exists though. $\endgroup$
    – M.Hoppe
    Commented Mar 12, 2020 at 9:06
  • $\begingroup$ The motion path is just visual, thats it. $\endgroup$
    – AJCDFIN
    Commented Mar 12, 2020 at 15:13
0
$\begingroup$

#select the armature

lastbone = 3 #index of the last bone (3 bones then is 2)


import bpy
ob = bpy.context.object
mp = ob.pose.bones[lastbone].motion_path

if mp:
    path = bpy.data.curves.new('path','CURVE')
    curve = bpy.data.objects.new('Curve',path)
    print(curve)
    bpy.context.collection.objects.link(curve)
    path.dimensions = '3D'
    spline = path.splines.new('BEZIER')
    spline.bezier_points.add(len(mp.points)-1)
    
    for i,o in enumerate(spline.bezier_points):
        o.co = mp.points[i].co
        o.handle_right_type = 'AUTO'
        o.handle_left_type = 'AUTO'
$\endgroup$
1
  • $\begingroup$ Hello, thanks for your answer. Could you elaborate a bit on what exactly the script does ? Maybe add a few comments for people to understand it better. Thanks :) $\endgroup$
    – Gorgious
    Commented Mar 2, 2021 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .