So, where are we at with mountObject?

Expanding and utilizing the engine via C++.
8 posts Page 1 of 1
chriscalef
Posts: 341
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Mon Dec 07, 2015 8:38 pm
I've never done anything on my own with mountObject, but now I'm finding a pressing need to make it work. I've been testing on tsStatic, but ultimately I'm going to need to do it with PhysicsShape (or, GameBase if we want to go deeper, unless it's going to go all the way down to any SceneObject).

I just discovered PR #680 and I see it on the list for 3.8. Did it make it in? I'll have to DL and test it, hadn't gotten around to it, but am curious if anyone has any help for me on this issue anyway.

For example, do we still need nodes named "mount0" etc or can we just mount to any node now? And does the mounted shape still need a "mountpoint" node? Or is all that just the ShapeBase implementation?
Duion
Posts: 871
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Dec 07, 2015 9:31 pm
mount0 is the default mount node, but you can mount to anything, like bones also.
chriscalef
Posts: 341
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Mon Dec 07, 2015 9:34 pm
Does the chart in #680 still apply? i.e. it works for ShapeBase, but not tsStatic, etc? If so, is there still a plan to generalize this functionality up the hierarchy?
Bloodknight
Posts: 103
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Tue Dec 08, 2015 12:05 am
https://github.com/OTHGMars/Torque3D/tr ... _object_ex

this is the source of the work done as far as i can tell, i'm not sure it made it to a PR even much less the engine, or at least my search turned up nothing.

Maybe that will give you a head start if nothing else
chriscalef
Posts: 341
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Tue Dec 08, 2015 8:36 pm
Right on, thanks @
User avatar
Bloodknight
. I was gonna go there next anyway, but I went ahead and did my long awaited merge of 3.8 first, and then merged the mount_object_ex branch. Which, after a few conflicts with the physx branch in tsStatic.cpp, went pretty smoothly.

However, on first test, I can't tell if it doesn't work or if I'm simply doing it wrong. I'm trying to mount a tsStatic to another tsStatic, for first pass, and I think it crashed the first time I tried, but on second and further tries it doesn't get a crash, but I get no apparent mounted behavior, ie I move the object I mounted the second object on, and the second object doesn't move.

Will look at it more later but out of time for the moment.
chriscalef
Posts: 341
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Dec 09, 2015 12:10 am
Well, I got a chance to do some more testing, and have found that as a matter of fact one (and only one, unfortunately) of my test models actually is capable of being mounted onto another shape. For some reason the Michael4 character model can mount just fine on both physicsShapes and tsStatics, while performing his animations uninterrupted. Which is a nice little ray of sunshine.

Now, on to figure out the secret sauce...
chriscalef
Posts: 341
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Dec 09, 2015 2:42 am
Results: my fault! (What a surprise.)

The problem was a bad merge decision which ended up kicking us out of necessary mount-related code if we didn't have an ambient sequence. (oops)

Still got a ton of work to do on the modeling end, of course, including finding the proper node to attach the rotor, and addressing the mount transform issue, but we do have a working two level hierarchy here, with the blade attached to the rotor, which is attached to the helicopter.

Image
chriscalef
Posts: 341
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Thu Dec 10, 2015 4:58 am
Whoops, thought I posted this last night, but anyway, mountObjectEx offset transforms check out as well:

Image
8 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest