mystara
Member
|
[Bug?] Sub-object position
I create an object, and then create a sub-object of that object.
For the sub-object, I then load light\point.obj and position it in the world.
However, it's position in the world does not appear to match where I actually place it. For example:
o.finalMatrix().pos and o.matrix.pos both return (-1.21, 0.73, 10.1). However, this location is a long way away from any of the objects in the world, and the correct location is nearer (25.5, 0.5, -85.8).
Not quite sure why. Possibly a bug?
|
|
12-31-2012 07:45 PM |
|
Esenthel
Administrator
|
RE: [Bug?] Sub-object position
sub objects are not meant for drawing (they don't take parent matrix into account)
please think of them like character items
|
|
01-06-2013 10:30 PM |
|
mystara
Member
|
RE: [Bug?] Sub-object position
I understand. But I created a new object type that draws its sub-objects.
Is there no way to determine the location of the sub-object?
|
|
01-07-2013 09:31 AM |
|
Esenthel
Administrator
|
RE: [Bug?] Sub-object position
You can try transforming sub object matrix by parent object matrix
I think sdk tutorials game folder has shown this with lights tutorial. The one with table, candle and a couple of loading lights in the scene
|
|
01-21-2013 11:54 AM |
|
mystara
Member
|
RE: [Bug?] Sub-object position
Okay, I shall give it a go. Thanks
|
|
01-21-2013 09:47 PM |
|