Horse pulling a cart

Hi.

I have the following situation:
I have a model of a bull (with bones and animation) and a model of a cart (also with bones and animation).
Now I want to connect them, no problem. But I want to use the connection point as a kind of axis.
If the bull is moving forward the cart should follow. This is no problem, because they are connected. But if the bull rotates to the left, the cart should not be rotated. The cart should just follow the connections point. The pictures clarify what I am trying to explan.

Befor

After

Pictures aren’t loading.

No picture and no code, but I suppose that you are looking for HingeJoint.


Ok, here are the pics.

Anyway, hingleJoint is exactly what I was looking for.
Thx.

Hi, it’s cool if you find HingeJoint your solution already. Indeed it should… but this is my two cents. If your simulation gonna be fully physics exact? that’s the way to go, but just half way.

  • Focus in that cart. Do the cart also have four wheels ( i suppose) as well ? So the control of the HingeJoint just only simulate the force from the bull to the cart, not from the cart wheel to the cart and the cart to the bull. If the cart also have weight, it also put force in the wheels!

  • Focus in that HingeJoint. Is it a Angle constrainst that should be declared to make the cart and the bull motion looks better?

My experience come from a similiar situation where i simmulate a train with a lot of block come after. This situation of course are more complicated as I also have to write a motor simulation and a synchonizer for each every wheels. But what valuable i learnt is the HingeJoint usually ruin the mood… Why? Because it’s a very strict physic constraints which sometime just useful for “measuaring and calculating purpose” not good for “visualization purpose”. Take a look at SpringHingeJoint maybe if you want to do better “visual” simmulation, ex: your bull can stop acidently and cause the cart to be stalled after delayed miliseconds… Hope this help.

1 Like
@atomix said: Hi, it's cool if you find HingeJoint your solution already. Indeed it should... but this is my two cents. If your simulation gonna be fully physics exact? that's the way to go, but just half way.
  • Focus in that cart. Do the cart also have four wheels ( i suppose) as well ? So the control of the HingeJoint just only simulate the force from the bull to the cart, not from the cart wheel to the cart and the cart to the bull. If the cart also have weight, it also put force in the wheels!

  • Focus in that HingeJoint. Is it a Angle constrainst that should be declared to make the cart and the bull motion looks better?

My experience come from a similiar situation where i simmulate a train with a lot of block come after. This situation of course are more complicated as I also have to write a motor simulation and a synchonizer for each every wheels. But what valuable i learnt is the HingeJoint usually ruin the mood… Why? Because it’s a very strict physic constraints which sometime just useful for “measuaring and calculating purpose” not good for “visualization purpose”. Take a look at SpringHingeJoint maybe if you want to do better “visual” simmulation, ex: your bull can stop acidently and cause the cart to be stalled after delayed miliseconds… Hope this help.

Hi,

at first thx for sharing your experience. I do not need a fully physics exact. I hope that the force from the bull to the cart generates good visual results.
I do not need the force between the wheels and the cart because the cart has already an animation for drive (animated in Blender). The bull has also an animation for walking forward.
In general I have two issues to solve:

A) Simulate nice looking turns (the HingeJoint should to this)
B) Bull and cart should stay on the ground, especially when theire posisions have different slopes (e.g. at the beginning or ending of a hill/mountain)

At the moment the whole game is without any physics and I want to use physics just for the system between the bull and the cart. That means I calculate the vertical roation of cart by myself (since the terrain is not in physics). On one side the vertical roation of the cart changes if it slope of the terrain changes. On the other side the vertical roation of the bull does not change at all.

I believe I just have to try it out. I will post the result as soon as I have something :slight_smile: