Small breakthrough: Two separate objects move as one!

Post » Tue Nov 20, 2012 5:32 am

Thanks for the advice. My bench seems to be attaching now, the thing is as soon as any force acts upon the bench it disappears (I'm assuming its going spastic and flying off somewhere). If I initiate any translation of the lift, it disappears. If an actor bumps into it, it disappears. It's also attaching it an angle of 90 degrees in the y-axis, I'm assuming this has something to do with the orientation of one of the nodes?
User avatar
Josh Trembly
 
Posts: 3381
Joined: Fri Nov 02, 2007 9:25 am

Post » Tue Nov 20, 2012 7:18 am

Thanks for the advice. My bench seems to be attaching now, the thing is as soon as any force acts upon the bench it disappears (I'm assuming its going spastic and flying off somewhere). If I initiate any translation of the lift, it disappears. If an actor bumps into it, it disappears. It's also attaching it an angle of 90 degrees in the y-axis, I'm assuming this has something to do with the orientation of one of the nodes?
Very likely, but probably also problems with the offsets in the AddHavokBallAndSocketConstraint calls. I'm not very good with these (I'm bad at visualising spatial relationships and poor at arithmetic) but I've had lots of practice with my flying machine mod, so I could have a look at them if you want. Drop me a PM if you do - I'd probably need the models, textures, scripts etc. and an .esp with them in place for testing. I assume none of this is uploaded to your dropbox account?
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Tue Nov 20, 2012 7:48 am

Very likely, but probably also problems with the offsets in the AddHavokBallAndSocketConstraint calls. I'm not very good with these (I'm bad at visualising spatial relationships and poor at arithmetic) but I've had lots of practice with my flying machine mod, so I could have a look at them if you want. Drop me a PM if you do - I'd probably need the models, textures, scripts etc. and an .esp with them in place for testing. I assume none of this is uploaded to your dropbox account?

I honestly am trying not to derail this thread but so far in my attempts to add a constraint between two objects I think everything has been on topic. I will give you a PM, but for the benefit of others coming to this thread how does one go about figuring out their desired offsets? Are the node locations always at the origin/zero-point of a model?
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Tue Nov 20, 2012 10:39 am

I honestly am trying not to derail this thread but so far in my attempts to add a constraint between two objects I think everything has been on topic. I will give you a PM, but for the benefit of others coming to this thread how does one go about figuring out their desired offsets? Are the node locations always at the origin/zero-point of a model?
Well, for me the process of working out the right offsets is mostly a matter of swearing, muttering, and poking hopelessly at a calculator :D. Ok, so I exaggerate, but the main problem with trying to sort it out in a thread like this is that it depends so much on the exact geometry of the objects in question and where they need to be in relation to each other. It's certainly not off-topic! But without being able to look at the files in Nifskope, and hop from node to node comparing coordinates, it all gets very slow and long-winded.

Basically, the nodes being attached can be offset by arbitrary amounts from the zero point of their model (and BhkRigidBodyT nodes can have additional offsets of their own), and so the havok ball-and-socket joints being created to connect them each have to be offset from the rigid body of one object so it has three distinct co-ordinates of attachment, and offset from the rigid body of the other object so that they line up properly in the world-space.

A good anology would be that you're drilling three holes in the bench, and three holes in the elevator, and they have to line up in pairs so you can put a bolt through each pair of holes to lock them together. But you can only specify the locations of each hole in terms of their offset from the zero-point of the rigid body - and you can put the 'holes' in empty air 3 feet up or in solid rock 4 miles down :D.

I'll post something in this thread when I've looked at the files, but I'd just be tripping over my own assumptions if I didn't have them :).
User avatar
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

Post » Tue Nov 20, 2012 6:01 am

Ok, I think I'm following. So then are the CK Cartesian Coordinates reliable for these calculations?
User avatar
CxvIII
 
Posts: 3329
Joined: Wed Sep 06, 2006 10:35 pm

Post » Tue Nov 20, 2012 8:23 am

Nope, the calculations are all relative to the zero points and node or rigid-body-t translations in the .nifs - the calculations are done in an imaginary space in which only the two .nifs exist, and the CK coordinates of any objects that use? those objects are irrelevant.
User avatar
Dean Ashcroft
 
Posts: 3566
Joined: Wed Jul 25, 2007 1:20 am

Post » Tue Nov 20, 2012 6:10 pm

I see. I thought that if a given node was centered at the CK coordinates of the object you could use those to get an idea of how far to offset another object.
User avatar
marie breen
 
Posts: 3388
Joined: Thu Aug 03, 2006 4:50 am

Previous

Return to V - Skyrim

cron