Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Minimesh.GetRotation  (Read 508 times)
newborn
Customers
Community Member
*****
Posts: 2437


WWW
« on: January 12, 2008, 11:30:11 AM »

Before I submit this as a bug, I would like at least 1 confirmation.

Lets say that I build the matrix out of landscape normals and apply it to minimesh:

for i as integer = 0 to 100
  Minimesh.SetMatrix(i, GetMatrixFromLandscapePoint(x,z))
next

As you can see in the following screenie, it works:





Now, the problem I get is if I try to get the rotation values from that minimesh, it always return 0.

for i as integer = 0 to 100
  vRotation = Minimesh.GetRotation(i)
  Minimesh.SetRotation(i, vRotation)
next

As seen in the following screenie, all rotation values are set to zero:





Correct me if I'm wrong, but after applying a matrix to a mesh/minimesh, shouldn't the rotation be updated as well?

Logged

WEst
Community Member
*
Posts: 813

Daniel Martinek


WWW
« Reply #1 on: January 12, 2008, 11:50:33 AM »

I think this is connected to the fact that you can only use SetMatrix OR SetRotation, so a workaroung would be to use the mathlibrary and grab the rotation from the matrix.
Logged

Greetings

Daniel Martinek
Lead Programmer
Roaming Nova Studios
newborn
Customers
Community Member
*****
Posts: 2437


WWW
« Reply #2 on: January 12, 2008, 01:06:41 PM »

That's interesting WEst, didn't know that...

I'm digging throught TVMath, can't find which method you're talking about. Is there something like GetRotationFromMatrix?
Logged

WEst
Community Member
*
Posts: 813

Daniel Martinek


WWW
« Reply #3 on: January 12, 2008, 02:05:00 PM »

There should be something like TVEulerAnglesFromMatrix.
Logged

Greetings

Daniel Martinek
Lead Programmer
Roaming Nova Studios
newborn
Customers
Community Member
*****
Posts: 2437


WWW
« Reply #4 on: January 13, 2008, 12:36:07 AM »

Yep, found it! Darn thing returns (0,0,0) as angle... but I'll work on it!

Thanks WEst!

Logged

Pages: [1]
  Print  
 
Jump to:  

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