Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: TVMiniMesh.SetRotationArray() is broken  (Read 681 times)
Mietze
Community Member
*
Posts: 278

Pleeease, don't let it crash!


WWW
« on: September 30, 2008, 03:11:32 AM »

Hey,

I just found out that TVMiniMesh.SetRotationArray() does not work as expected in the managed dll. I expect the following code to do the same, but unfourtunately the SetRotationArray() seems to add a random rotation. The TVMiniMesh uses Meshs for instancing and no billboards.

Code:
m_pMiniMesh.SetRotationArray(nInstances, vaRotationArray);

for (int i = 0; i < nInstances; i++)
    m_pMiniMesh.SetRotation(vaRotationArray[i].x, vaRotationArray[i].y, vaRotationArray[i].z, i);
Logged

Check out my blog at www.e-studioz.de - The finest in gross trash Wink
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #1 on: September 30, 2008, 03:05:07 PM »

Are you using radians or degrees?
Logged

JAbstract.....Don't just imagine, make it happen!
Mietze
Community Member
*
Posts: 278

Pleeease, don't let it crash!


WWW
« Reply #2 on: October 01, 2008, 12:31:39 AM »

Radians
Logged

Check out my blog at www.e-studioz.de - The finest in gross trash Wink
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #3 on: October 01, 2008, 01:43:51 PM »

...and what you you have set for the TVEngine.SetAngleSystem? Is that Degrees or radians?
Logged

JAbstract.....Don't just imagine, make it happen!
Mietze
Community Member
*
Posts: 278

Pleeease, don't let it crash!


WWW
« Reply #4 on: October 01, 2008, 02:08:23 PM »

Also radians Wink Meh.. I use TV3D for almost five years Tongue
Logged

Check out my blog at www.e-studioz.de - The finest in gross trash Wink
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #5 on: October 01, 2008, 09:57:54 PM »

hmm.....strange, perhaps internally it's always using degrees....unless....
when you say it "adds random rotation", does it seem to change rotation even when you do not?
Logged

JAbstract.....Don't just imagine, make it happen!
Mietze
Community Member
*
Posts: 278

Pleeease, don't let it crash!


WWW
« Reply #6 on: October 02, 2008, 12:25:22 AM »

Nope, this would only happen when using billboards with a certain rotation mode, wouldn't it? Smiley
Logged

Check out my blog at www.e-studioz.de - The finest in gross trash Wink
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #7 on: October 02, 2008, 04:52:40 PM »

well what I meant is, is there erratic rotation? Like say you set rotation to (0,0,0). Does it go to (0,90,23) then to (234,210,23), (34,22,230), (4,95,242)....ect? Or does it stay still after you set the rotation but rotations just seems off?
Logged

JAbstract.....Don't just imagine, make it happen!
Mietze
Community Member
*
Posts: 278

Pleeease, don't let it crash!


WWW
« Reply #8 on: October 03, 2008, 04:03:43 AM »

It seems like there is no erratic rotation, its more like a constant factor. The weird thing is, that after a SetRotation(0, 0, 0) a GetRotation() returns something different :/
Logged

Check out my blog at www.e-studioz.de - The finest in gross trash Wink
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #9 on: October 03, 2008, 12:21:42 PM »

hmm....does SetMatrixArray work?
Logged

JAbstract.....Don't just imagine, make it happen!
ZaPPZion
Community Member
*
Posts: 341


« Reply #10 on: October 03, 2008, 12:22:22 PM »

do you have any rotations applied when adding the mesh to the minimesh? like a random value to make it look more natural? might be a bug that it keeps that value?
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #11 on: October 05, 2008, 07:14:13 AM »

Well I don't know exactly what's going on, the code seems ok.
It's maybe the managed wrapper that corrupts the data someway.

But BTW I fixed a bug in that function, because it didn't work if you were in Degrees mode Wink
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks