Page 1 of 1

Possible to have an articulated vehicle?

Posted: Thu Jul 01, 2010 12:34 am
by fo0k
I have always thought impossible but do you think a spring could somehow achieve this?

Basically have a vehicle towing something.

Re: Possible to have an articulated vehicle?

Posted: Thu Jul 01, 2010 8:16 am
by Apache Thunder
BFV has a object class that does this. Tow hooks or something. However BF42 doesn't have this obviously.

Only way I can think of right now is via a spawner that holds the vehicle to the back of your vehicle doing the towing. However this means that you can't tow vehicles that are no longer on the spawn or when someone gets in the vehicle and moves it. The collision system is probably too buggy to beable to have a vehicle stay reliably on a host collision mesh without making it a bit large or box like.

Posted: Thu Jul 01, 2010 10:23 am
by freddy
cant think of anything either, a spring moves in just one direction i think and if one use rotational bundles they would need player input to move

sure one could use a spawner to tow a pco with, but it would always be "stuck" in the same relative position

maybe it could work somewhat with two or more springs, one for x and one for y?

Re: Possible to have an articulated vehicle?

Posted: Thu Jul 01, 2010 12:32 pm
by Jeronimo
This could be done quite similar to a tank actually. You'd just move the tower to the back of the vehicle, set the center of rotation to the trailer coupling, give the rotational bundle of the tower some wheels and mobile physics and voilĂ , you have a little trailer at the back of your truck. The y-axis of the mouse can be used to steer the whole bundle.

Another idea: Create a vehicle with a coupling and a trailer as two independent PCOs, shape the coupling as a circle and put small invisble wheels with springs onto it. The coupling should be able to move up and down (like it's down with the forklift in DC etc.) The trailer then needs to have something than can slip into the coupling and like that gets tied to the tractor, without easily falling of. Because of the circle shape, the trailer would actually not be pulled put pushed by the vehicle, which is a simple collision and therefore should be absolutely doable for the engine... Additionally, giving the coupling a collision damage of 0 could prevent it from breaking off on ferocious driving ^^

Re: Possible to have an articulated vehicle?

Posted: Sun Aug 01, 2010 5:59 pm
by SK_Scorpion
Has anyone actually tried these ideas? I want to achieve this but has so far not succeeded in making a coupling which acts like its supposed to. And I guess adding alot of friction to surfaces or the sticky code does not work? The problem with springs are that they react in all directions if enough force is applied to it. Will try some more though but it would be nice to hear if anyone got some new ideas or have succeeded in making a articulated vehicle. And I don't want a trailer that moves when I'm standing still when steering.

Re: Possible to have an articulated vehicle?

Posted: Sun Aug 01, 2010 6:46 pm
by fo0k
SK_Scorpion wrote:And I don't want a trailer that moves when I'm standing still when steering.

lolled.


Yeah I want to also see this. I do think a loose spring could somehow achieve it but have never got around to try it.

What I envision:

Car has a 5th 'wheel' object on the back of it.. where the coupling would be. the wheel is attached with a weak spring. The wheel is positioned 'flat'. e.g. looks like a wheel thats fallen over on its side.

The actual wheel object looks nothing like a wheel though and is in fact a model of the trailer.. the trailer has 2 normal free rolling wheels positioned where they would normally be.

the car moves and the weak spring pulls the 'wheel' which is the trailer and the free rolling wheels roll along behind it..

This all works perfectly without any glitching, crashes or strange behavior. ;)

that weak spring allows movement in all directions as you said.


The reason I have not tried it is because I cant face 4.5 million CTD's just to find out it really, absolutely, totally cannot work. :(

but I think it can.... I think it can.

Re: Possible to have an articulated vehicle?

Posted: Sun Aug 01, 2010 7:17 pm
by SK_Scorpion
@fo0k Thanks for your quick response. Sounds promising but I've never got a horizontal wheel to work as intended (roll and have tension in the horizontal plane). Will try again now when new hope has arrived. Appreciated. :)

Re: Possible to have an articulated vehicle?

Posted: Mon Aug 02, 2010 5:58 am
by Coroner47
I was working on some stuff with skeletons & remembered this post. Could you use a skeleton like how the soldiers hands stick to a steering wheel? Just a quick thought.

Re: Possible to have an articulated vehicle?

Posted: Mon Aug 02, 2010 8:35 pm
by Apache Thunder
It's impossible as far as I know to have a object stick to a skeleton part like you would a handweapon or soldier part. The engine doesn't allow it outside the soldier class. Sorry. :(

Re: Possible to have an articulated vehicle?

Posted: Tue Aug 03, 2010 2:07 pm
by SK_Scorpion
@apache_thunder Guess we can't kill a soldier and use him as a trailer hitch. ;)

I'll try the tilted wheel theory then.