Attaching camera to object attached to bone?

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Attaching camera to object attached to bone? // Tech Forum

1  |  

Post by W!ZARD // Sep 2, 2008, 5:37am

W!ZARD
Total Posts: 2603
pic
I have a character mesh attached to a skeleton. I have a pair of glasses attached to the skeletons Head bone. Encapsulated with the glasses is a camera to provide real time reflections in the lenses of the glasses - all of which works perfectly.

Objects immediately in front of the glasses are seen by the camera and reflected in the lenses of the glasses. However, when I use dynapose and turn my characters head, the glasses frame and lenses turn with the head bone as expected - the camera however, despite having it's Owner Matrix linked to the WldMatrix of the Transform Object that also links to the Owner Matrices of the glasses lense and frame does not turn with the head bone:confused:.
This means that the reflection in the glasses does not move with the glasses.:(.

So my question is, how do I get the camera that provides the reflection image to turn along with the glasses and the characters head?

Hopefully that's clear - I can provide screen shots if required.

I have this animation shot set up so that as one character turns her head, the other character is reflected in her glasses - which should look really cool. At the moment it just looks really wrong!!:o

Post by trueBlue // Sep 2, 2008, 8:12am

trueBlue
Total Posts: 1761
pic
The way I did it was to drop the Sunglasses into the Hair object and hook it's OwnwerMatrix to the Bone Transform's WldMatrix. You then need to select it and position it.

Post by W!ZARD // Sep 2, 2008, 9:26pm

W!ZARD
Total Posts: 2603
pic
Thanks trueBlue. I must have been too tired last night - I knew the answer would be something simple but....


Well anyway, after some sleep I tried again and just connected the world matrix of part of the glasses geometry to the owner matrix of the camera and now everything is working just fine. It's a slightly different route to the one you used but it's got me where I wanted to be.


Thanks very much for your assistance. It is fully appreciated!


~W~
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn