Jump to content
Tisor

Now with PhysX... Able to make articulated trailers?

Recommended Posts

A lot of times this has been talk in this forums. Today, in the FFAA Meeting we have come into it again, because we want to add this:

http://upload.wikimedia.org/wikipedia/commons/6/60/Kynos_Aljaba_K-15-100_(3).JPG

So, we have been looking around and we have two ideas:

- Scripting with attachto and setDir commands... but this will make almost rigid the trailer, so is not very good.

- Gnat's pin and hole method.. but we know it won't work because of the distance and the geometry lod...

But we have read in some thread that with PhysX this would be maybe posible... so we are bringing this back again, and see if someone have try something already on ArmA 3, or maybe is able to test...

Maybe BI Developers can also give us some information, but I really doubt this...

So... anyone? Any ideas?

Share this post


Link to post
Share on other sites

sorry- no idea but indeed a missing feature and i remember that the developers announced something like "you can get stuck in mud or sand and towed by another vehicle"

Edited by funkotron

Share this post


Link to post
Share on other sites

Wait, does noone remember the old times when we did not have the luxury of "attachTo"?

I made a chopper lift script back in ArmA1 that was working with setVelocity and simulated a simple rope by modifying those velocity-values based on the distance between the two objects.

It had some minor issues (probably caused by lag) where your chopper could ge smashed by the suddenly rubberbanding vehicle it was carrying. Aside from that however, it worked pretty well and looked better than any attachTo script ever could (the attached object actuallys swings around with that).

(I remember having a lot of fun using an M1 as a wrecking ball.... until it bounced and wrecked my chopper)

Come to think about it, I guess I'll have to dig it up and see if I can improve it.

Share this post


Link to post
Share on other sites

Well I think this won't be working for that... Scripting is giving you, don't matter what you use, a solid structure, so imagine when you start climbing a hill... the trailer will get into the ground, and this is looking ugly..

Pin and hole seems to be the best method, but maybe PhysX is bringing us any surprise, as it works in VBS.

Share this post


Link to post
Share on other sites
the trailer will get into the ground, and this is looking ugly..

With attachTo, yes it would.

That won't happen however if you're using a script that relies on setVelocity. That basically just drags the other object behind, while still leaving it room to move (depending on how long the rope is).

I guess the concept is a bit hard to describe, I'll see if I can dig up my old script and put a working example for A3 together.

Share this post


Link to post
Share on other sites

But would this work when turning and so on? If you can do it, that would be amazing.

Share this post


Link to post
Share on other sites

It looks so easy in VBS by the way... is just add a memory point and this 2 lines:

connectionChild = "tow_jaw"; //name of the memory point where trailers should attach to

coupleType[] = {"tow_jaw"}; //type of connection, standard options are: "tow_jaw", "5th_wheel_low", "5th_wheel_med", "5th_wheel_high", "goose_neck"

http://manuals.bisimulations.com/vbs2/2-00/devref/#Adding_Models/How_to/AMHT_Physx.htm

As I see, it is using CarX simulation, so... will it be posible? Anyone would give it a try?

Share this post


Link to post
Share on other sites

Not at the moment.

Heard something about ArmA 3 team is implementing RopeX into the game.. if this can be confirmed, then we are done :D

Share this post


Link to post
Share on other sites

Pretty sure this is being worked on currently. And I don't mean by BIS. Think the current scheme involves utilizing a simulated ball joint (under PhysX things). Sure it'll make public news if it makes progress. Can't recall who was chatting about it at the moment though.

Share this post


Link to post
Share on other sites

This has been just changed to "Assigned" by Dwarden:

PhysX based rope object

Would be great that maybe Dwarden or the assigned guy can confirm us that they are working on it. We don't want any release date or anything, we just need a "YES! It will be implemented" :o :o :o

Share this post


Link to post
Share on other sites

This will be very nice .... although AttachTo works fine, it looks REALLY odd to see it fail to articulate properly.

Share this post


Link to post
Share on other sites

I'm still working on the scripted solution... which has it's own problems. I'd be interested to know who's working on the ball joint Hatchet.

Share this post


Link to post
Share on other sites

It was Nou, caught up with him just now. Think the issue is with attachTo still, so that is on hold currently. Pretty sure deanosbeano has tinkered with these things also.

Share this post


Link to post
Share on other sites
It was Nou, caught up with him just now. Think the issue is with attachTo still, so that is on hold currently. Pretty sure deanosbeano has tinkered with these things also.

He has worked on these things, back in Arma1 he actually made remarkable progress on my M931a1 Tractor-Trailer Addon! He had showed me a video and posted it in my old thread, showing it working pretty much perfect with only minor issues that I am sure could be fixed in Arma3. But from what I remember he had lost all of them updated files in a computer crash and gave up. And all I have left to this day is an old version of that model, with the early...non-working/broke versions of said scripts! But I am still working on it and is still my main goal, however I am no professional and still even after all them years(and now with a daughter) I have not learned much more in 3D Modeling and Scripting so the model and trailer and scripts are not accurate, but none the less I have ported it to Arma3, but I am still having much problems.

If anyone is interested in my Tractor-Trailer and its current-broken scripts to try and may be fix it, then PM me.

Dave,

Share this post


Link to post
Share on other sites
It looks so easy in VBS by the way... is just add a memory point and this 2 lines:

connectionChild = "tow_jaw"; //name of the memory point where trailers should attach to

coupleType[] = {"tow_jaw"}; //type of connection, standard options are: "tow_jaw", "5th_wheel_low", "5th_wheel_med", "5th_wheel_high", "goose_neck"

http://manuals.bisimulations.com/vbs2/2-00/devref/#Adding_Models/How_to/AMHT_Physx.htm

As I see, it is using CarX simulation, so... will it be posible? Anyone would give it a try?

Interestingly enough, the connectionchild and parent commands are in the Arma3.exe. The only way to test if they work is to actually set it up like it would be in VBS. I played the VBS lite thingy that came out and I remember using trailers. If I recall it used the action menu, but there is no "attach trailer" command that I've seen.

After some more searching, any and all VBS commands relating to physX attachments has been removed or disabled in Arma3.

My suggestion is to use the pin and hole technique, but don't have a visual lod on the physX trailer. Instead, have the trailer's visual lod as part of the towing vehicle's visual lod, and animate the visual trailer to match the angle and direction of the geometric trailer. This has a few advantages:

1. No attachto scripts

2. No need to script the trailer wheels, they would be animated along with the towing vehicle

3. if the trailer experiences lag or positional stuttering, it wouldn't be as visually obvious because you couldn't see the actual physX trailer. The visual trailer would always be 100% attached to the tow vehicle.

Edited by Sakura_Chan

Share this post


Link to post
Share on other sites

That's an interesting take on it Sakura, The current problem with PhysX enabled vehicles being towed, is that they go to sleep/handbrake mode (even when you setpos/setvelocity them in a loop?) and lock up the wheels. That would also be solved when it's the same vehicle.

Too bad I lack the skills of making such a ball joint... Maybe I have to learn...

One really big downside is that you can only have one (or a few) trailers, or towed things because they're baked into the model. But can't we attachto stuff to (invisible) animated parts? It works for the memory points on the man-class, so maybe even on vehicles? But then the wheels won't turn...

Edit: Tisor, I just missed the first page of this tread, but it seems you're not aware of my scripted "solution"

It works with setvelocity, to maintain the slope direction, but it can behave a bit "elastic" because of the "controller" for the velocity that needs to be set.

Anyway, I'm working on porting this to A3, untill we find a better solution using physX

Edited by rundll.exe

Share this post


Link to post
Share on other sites

^^ Hmmm I missed that video rundll ... nice one mate! Would indeed be good to have a port, until a proper solution using PhysX can be found.

Share this post


Link to post
Share on other sites

Hmm.. that is interesting Sakura and makes good sense. Appreciate the poking around and sharing of information. Not an ideal solution in the global sense, but would probably be worthwhile for a dedicated project. I'd personally like to be able to add the trailers for a few watercraft/vessels to misc. vehicles. Having separated models and functions to allow the towing functionality is ideal, for most I suppose. Is there a proper ticket floating around?

I was really hoping BIS would include the needed parts to make things functional (which could still happen). Why even put the 5th wheel HEMTT in without it.

Share this post


Link to post
Share on other sites

rundll, I check your script and tried in ArmA 2 with a custom trailer model with some vehicles on top of it. Was so laggy and allmost undriveable... Hope Arma 3 guys come with this soon.

Share this post


Link to post
Share on other sites

Yeah that script is not compatible with OA... due to the position interpolation techniques (for MP) introduced there. I just finished fixing this for A3, but the performance is still horrible :(

Share this post


Link to post
Share on other sites

Would love to see this in A3. That horrible attachto looks so horrible while transporting cars with helicopters

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

×