no-python car suspension

hey,

is there a common way to realize a - mor or less - realistic car suspension? i googled around and found a lot of python scripts … but some people are doing it without a script. so, it seams to be possible. but how? i couldnt found any working example or explanation. Can anybody tell me how its done?

can nobody point me in the right diraction?

can nobody point me in the right diraction?

SuperGloop. Made one, I don’t think this is a tutorial though.

The video doesn’t really look like suspension to me, just a wheel rig. Isn’ suspension the system that handles the way a car bounces up and down? But anyways, it might be doable with a rig, if you’re good at setting up bone restraints maybe you can figure it out.

You can do simple vehicles with rigid body contraints.

It is doable, and fairly easy. A very simple rig with suspension is presented in this tutorial:

http://blender.freemovies.co.uk/car-game-tutorials/

A much better python-driven vehicle that takes advantage of Blender’s built-in vehicle controller physics is offered as a link within the Blender docs themselves. Here it is:

Even though it uses a python script to control the vehicle, it’s very easy to understand and will give you much more functionality.

Suspension is achieved by setting up a generic spring constraint on each wheel, and adjusting the limits and spring values in the Rigid Body Constraint panel of the Physics Properties window.

/uploads/default/original/4X/6/5/a/65ae63942dee22ff7f53a9fafe6c25f15df1f655.jpgstc=1

A car spring will normally be set up on the Z axis while all other axes are disabled. The Limits values refer to how much slack is given in either direction on that axis, so the lower limit you provide for the z axis will tell Blender how much distance from a wheel’s normal position it can move downward when colliding with something. The upper limit determines how much it can move upwards. A lower limit of -1 and an upper limit of +1 would give the spring 2 units of movement. A 0 value will keep it rigid in that direction (upper or lower).

The Spring values determine how easily the spring will move. You will only need to use the z axis for your springs, so leave the others disabled.

Attachments


Woah. Where the heck did you find a ‘generic spring’ type of constraint? Are you running a custom build, a build-bot build, UPBGE or what? Official 2.77a doesn’t have that

I’m running 2.76b

It’s not available in the BGE.

You can use 6-dofs. However, setting up springiness in the editor is not aviable yet. You propably want to use scripting anyways.
Remember about Hooke’s law
For amortization you want to add the damping over the stiff spring. It’s achieved using damping.
The final formula is:

Fsuspension = k * x + c * vx

where:
k = stiffness (N/m)
c = damping rate (N/m/s)
x = compression (m)
vx = compression speed (m/s)

I hope that this helps;)

By the way - that constraint shown above has normalized damping. If you want to use normalized damping inputs, you calculate the actual damping rate by multiplying k by the normalized damping rate.

I swear that half of you guys are only trying to show off and not very concerned about helping someone who’s new to Blender.

I use the create 6dof script linear and angular scrips supplied by tutorials for blender website…

one sec let me dig up a link

Linear
http://bgepython.tutorialsforblender3d.com/PhysicsConstraints/6DOF/LinearSpring/createConstraint

angular
http://bgepython.tutorialsforblender3d.com/PhysicsConstraints/6DOF/AngularSpring/setParam

I will try to set up a demo of several suspension types:
-live/dead axle
-double wishbone
-something else if I find enaugh time
Using only basic python. You may use it as a resource to learn from.
However, I’m not sure how to make the wheels steer when using constraints.

Well that makes is not so useful for a question about the BGE doesn’t it.

In the BGE you can use:


Which does much the same, but doesn’t allow control of spring or damping.

Attachments


Thank you sdfgeoff. whats the diffents between your 2 screenshots? could you do a example blendfile?

both of these websites contain sample blends

one is a angular spring, the other is an linear spring.

Here is a video that might help,


I tried this and it worked well.
The suspension was done using logic bricks. He put a force on the vehicle body pushing up and a force on the suspension components pushing down. The wheels, suspension components, steering components, and body are all tied together using Generic 6 Dof constraints. The video’s info contains a link the the blend. file; you can download it, and see for yourself how he did it. It’s not perfect, but it’s passable.