-
Truck Trailer
Hello,
I have the problem that I want to make a realistic Truck Trailer but dont have any idea how to ;).
My only idea was a funktion for the Trailer like
"alwas get position of car"
"everey 0.5 seconds get direction of car"
but thats looking not really realistic (specially then the car ist stopped or moving slowly)
did someone of you have an idea or better example for this problem?
greetings
Droggelbecher
-
Why don't you use the direction controller object (or whatever it's called) and rotate the trailer's direction towards that of the cab?
You could set it to rotate smoothly only when the speed of the cab is greater than 0.
-
Do you have an example or could make one for me? it sounds for me like the same problem when the speed is slow (only 1 or 5 or somethink like that) the trailer will turn around very (too) fast. :S
-
1 Attachment(s)
that looks so unreal :(
and i dont know what you wanted to say to me Crash86
i would be very happy if someone would create a example for me with a smooth and realistic "turnaround" of the trailer
Attachment 5223
-
Well I had a quick look at it and noticed you are using the race car object. This object only allows 32 directions and is very unrealistic. I sure there are many 360 degree car movement examples out there somewhere.
-
Not sure how you do a smooth rotation easily if you're using 360' rather than 32 directions.
I think the direction object extension (or whatever) that I'm thinking about only really works in the 32 directions.
I will try and take a look at the example above tonight and have a faff on with it.
-
i will be very grateful if you can do this because i have thatproblems since a long time :S
-
you'll have to use box2d. i got something workable doing that simulating a truck and hooking up/unhooking different trailers.
-
Danjo's right - the physics are actually extremely complicated. That's why if you ever played one of the old top-down Grand Theft Auto games, you'll notice there are no semi-trailer trucks (articulated lorries). A physics extension is probably the only way you'll get something realistic, with proper collisions.
-
hmm and if it is impossible to go backwards ? did someone have an idea for that?
-
Sounds like a chain or snake example is what you seek. Take a look on my website, as there are some examples that maybe you can adapt to what you need.
Marv
-
using box2d it will behave properly - ie go forward, back, etc. you have to make a truck with steering wheels, and some drive wheels. you also have to make a trailer with some wheels at rear and a pivot at the front, which you can connect it to the truck on and off.
its quite advanced, so you'll have to first experiment with box2d to get an understanding, otherwise the source if you looked at it would mean nothing to you.
i was working on a project with it, but i got sidetracked. still, i dont have a perfect knowledge of box2d myself, as the documentation for it is little to none for mmf.
-
i want to use it for a horse-drawn carriage and horses can't go backwards in that "situation". And the biggest problem is that i want to hold the game simple as possible (no "special" extensions) to guarantee the compatibility for the iOS, Android & XNA exporter at the end :S
-
good luck cause you wont do it in any way that looks normal without a physics extension