Train Simulation - Stuck at the first wheel.

'scuse me, but I am trying to make a simulation or a railway, and I am trying to make track and a wheel to run on it as a start. The track is, for now, a box. The wheel is the problem - I need to make an object with a concave angle. The blender game engine supports convex hull polytopes, but not concave. So, I am trying to ‘glue’ two objects together using the constraints. My wheel is composed of two cylinders, and I am trying to copy location and rotation so they act like one. Using one copy location, the cylinders overlap, and I cannot move them apart. Then, in the game engine, they act like they would normally. Using 2 copy locations does not work, I cannot move either cylinder. Can anyone tell me what I am doing wrong, or perhaps point to a decent tutorial?

Just use cylinder bounds… You don’t even need to do that…
You can use this.
Or trianglemesh (the non-static one) in the new test builds with softbody. You should’ve posted this on the GE thread.

Thanks for the advice B3D00. The wrapper looks nice, I will give it a shot.
I am using 2.45, so I do not have access to the soft body yet. The cylinder bounds are needed because the wheel needs to turn, and I am using two because it has to stay on the track. With one, it would rest on the track, but just fall off as soon as it reached a corner. The flange is needed for turning.

Where is the ‘GE thread’? I search, but… nothing.

[edit] the picture, that is two different bounding types. The grey is the rail, the black is the wheel.


If you parent one cylinder to the other, and then set ‘compound’ for the parent, that should do the trick.
Compound is found in the game settings panel, next to the bounds settings.

That worked better than anything else so far… but… well, now the flange is not taken into account in the simulation. Any tips?



Model RR.blend (128 KB)

And why are you using physics on the first place?

Ah, it was a small thing… I wanted the trains to derail if you went too fast around a corner, if you hit another train, and so on… Anyhow, thanks for the pointers, B3D00. I’ll look there.