Jump to content
Sign in to follow this  
Jantemplar

Semi truck and trailer aniamtion debacle

Recommended Posts

Hey guys, well have have my semi truck and trailer done, textured and animated, and i thought this was going to be a problem in the beginning (But was hoping the game engine would do it itself) Now when i drive the semi truck and trailer it drives like a bus, like one entire object instead of one at the front and one long one at the back.

Now what i have tried is animating the axle at the connection point between the truck and the trailer so that when the user turns right trailer goes right as you go around the corner, same with left. But if the truck is standing still the trailer still goes out to the left.

Now what i would like it to do is so that when is goes around a corner is acts like it is actually being pulled by the truck and correctly does this. But i am stuck as to how to do this, does anyone have any ideas.

Share this post


Link to post
Share on other sites

Its been one of my much thought about research projects ..........

You have several options;

a) Two different addons, held together via the GEO LOD "Pin and Hole" method. See my ArmA1 YouTube videos

b) Script the two together all the time. Some serious maths I suspect.

c) Something I've been meaning to try with ArmAII, animate the trailer with BOTH SPEED AND STEERING

C may defeat lots of problems with A and B, but C still has the issue that it only works on level ground unless you work out another animation way to animate the trailer up and down at the rear, trying to follow the terrain.

All in all, a pretty tough job to do.

VBS2 has trailer code, be nice if we got it as a patch, hint hint BIS

Share this post


Link to post
Share on other sites
Gnat;1448934']Its been one of my much thought about research projects ..........

You have several options;

a) Two different addons' date=' held together via the GEO LOD "Pin and Hole" method. See my ArmA1 YouTube videos

b) Script the two together all the time. Some serious maths I suspect.

c) Something I've been meaning to try with ArmAII, animate the trailer with BOTH SPEED AND STEERING

C may defeat lots of problems with A and B, but C still has the issue that it only works on level ground unless you work out another animation way to animate the trailer up and down at the rear, trying to follow the terrain.

All in all, a pretty tough job to do.

VBS2 has trailer code, be nice if we got it as a patch, hint hint BIS[/quote']

C sounds good, Ill give it ago, on the point of it trying to follow the terrain, what about adding suspension to it, like we do to the wheels. Or will that just make it bounce around like a kid on a bed.

Share this post


Link to post
Share on other sites
on the point of it trying to follow the terrain, what about adding suspension to it, like we do to the wheels. Or will that just make it bounce around like a kid on a bed.

? I assume you're taking about a 40 foot semi trailer. Thats a bit longer than the normal ArmAII "suspension" lol

But in saying that, you may be able to define the WHOLE trailer as "terrain following suspension" (so instead of just a wheel, the whole trailer is the "wheel" moving with terrain) with the single pivot point being near the hitch.

But that method faces some problems. Bouncing a lot as you explained because you now have no normal suspension on the rear trailer wheels. And this trailer-wheel simulation only follows 1 point on the ground, which means it will only tilt forward-backwards and any left-right terrain variation won't make the trailer tilt left-right (except when the truck itself tilts left-right).

But, for highway driving it could well look fine .....

This is all assuming you can get suspension to use the "rotate" animation instead of the normal "translate".

Share this post


Link to post
Share on other sites

Anybody ever have any joy with creating a 'towbar' of any descript?

Share this post


Link to post
Share on other sites

Care to expand on that Gnat?

I've never seen an effective towbar as yet - in VBS2 or otherwise...

Has somebody scripted a towing script that functions correctly - ie. pivot point?

If so, where is it? I'd love to see it in action...

Share this post


Link to post
Share on other sites
Gnat;1449728']any left-right terrain variation won't make the trailer tilt left-right (except when the truck itself tilts left-right).

But that's real life behaviour. If i might use aircraft terminology - A semi trailer coupling has no roll articulation at all. While we're about it' date=' there's only very limited pitch articulation.

---------- Post added at 02:09 PM ---------- Previous post was at 02:07 PM ----------

I remember your ArmA 1 work. I was really very impressed indeed. Your hole and pin worked pretty well, especially when reversing. Any truck driver can drive forwards, the skill is going backwards.

Share this post


Link to post
Share on other sites

Gnat, that is still VERY impressive. You haven't had a chance to update it for A2 by any chance?

Share this post


Link to post
Share on other sites

OK, so that's awesome - gives me a bit of a tingley feeling ;)

My ultimate goal (and I don't really care how we get there) is to be able to add a mod into an Arma2 / OA mission that does this:

home-page-truck.png&h=274&w=565&zc=1

From what I understand, we just need a 'trailer' model and then we should be able to use the pin/hole method in order to attach the trailer to a 'rig' (ie. the one from the Sigma 6 pack).

Personally, I'm just doing a bit of Arma2 scripting (which I thought was VBS2 - but now i'm a bit confused)... modelling and anything associated with models is out of my league, so I'll grab one of the guys who are doing modeling, and drag them in here...

Attaching the vehicles is straight forward because you don't have to do anything special (other than attachto)... although it would be nice to make the player drive the vehicles up a ramp, and use attachto to attach the vehicle to wherever they've parked it on the trailer... (I digress...)

Gnat - assuming the pin/hole method is documented somewhere - can you point me in the right direction and/or paste some sample script?

PS: I'm not a big fan of re-inventing the wheel, so if someone has already done this, I'd be uber-stoked to use something that already exists!

Edited by edwood

Share this post


Link to post
Share on other sites
Gnat, that is still VERY impressive. You haven't had a chance to update it for A2 by any chance?

Thanks Krem. No, never did.

From what I understand, we just need a 'trailer' model and then we should be able to use the pin/hole method in order to attach the trailer to a 'rig' (ie. the one from the Sigma 6 pack).

No both the trailer and the truck had to be modified. The truck had the "hole" the trailer had the "pin" in their GEO lods

Gnat - assuming the pin/hole method is documented somewhere - can you point me in the right direction and/or paste some sample script?

No, but it not complicated. As I said a big hole and big pin in the GEO Lods of the models.

BIG #1 ISSUE: Once the vehicle goes a little beyond the players view the ArmA game engine switches off normal GEO LOD interaction physics and the truck and trailer fall apart.

Hence AI will never be able to drive them unless you are ACTUALLY watching them. Turn your back ... boom, it falls apart.

I doubt the ArmAII engine is any different.

#2 Issue: Trailer has to be very light because its a dead weight that the truck has to drag. Very light trailer = bouncy trailer = random problems.

Share this post


Link to post
Share on other sites

I'm not a modder but could the hole and pin be a separate addon in two parts.

You could then just attach each part using the attachto command to any two objects you wish to try and tow.

Share this post


Link to post
Share on other sites

I have been working on a KW-900 with full working gauges, lights, doors etc. We also are in need of some scripting or direction help. I can handle the models etc just need some help. Here is what we have so far. I am still working on some final extra touch ups aligning gauges etc. But it is FULLY functional and in game working.

arma22011071617315597.png

arma22011071617323514.png

arma22011071617324805.png

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×