Create the vehicle (body and 4 wheels as seperate objects).Thus you have to add another constraint between each vehicle and the body - a hinge constraint to only allow rotation. Using the motor constraint alone, the vehicle will fall apart. What am I doing wrong? How can I fix this? I also tried setting the empty constraint type to Motor instead of Fixed but then it just falls apart.Īlso rotating the constraints does not help at all. Obviously that is an either or switch for physics/animation In that case the car is not falling anymore (physics won't be applied). Only when I'm checking the animation checkbox (for the active rigid body wheels), the wheels are moving. Unfortunately this does not change anything.Īfter running the script I got a totally messed up scene (everything is wrong positioned/rotated) and if I restart the animation, the vehicle just keeps falling (Only the Rigid body simulation applies without the rotation) Wheel.keyframe_insert(data_path="rotation_euler", frame=i) # insert keyframe Wheel.rotation_euler = 0 # reset rotationįor i in range(1,50): # step through 50 frames Wheel.animation_data_clear() # clear keyframes Therefore I've set up the following script import bpy, time When I set the constraint to Hinge, also the wheels are turning when the vehicle rolls down a test plane) But I need to control the vehicle via a python script (Apply a rotation/force to the 4 wheels) ![]() ![]() I have now set up a rigid body so I can simulate simple physics I have set up a simple car like model in blender 2.8
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |