About Store Forum Documentation Contact



Post Reply 
question Game::Item
Author Message
Babulesnik Offline
Member

Post: #31
RE: question Game::Item
(06-06-2011 01:01 AM)Driklyn Wrote:  
Code:
point=ObjItem[4].skeleton->findPoint("1")->pos.x;

This line should work provided that you know for sure that: a) ObjItem[4] has a skeleton, and b) that skeleton has a point named 1. If either case is not true, the game will crash.

If you absolutely positive that both cases are true, then the game is crashing for some other reason.

Thank you very much. You could not help with this issue ? http://www.esenthel.com/community/showth...p?tid=3722
06-06-2011 06:48 AM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #32
RE: question Game::Item
Why the skeleton is in the other coordinates of the mesh?

If I check the coordinates of points
Code:
point[1]=ObjItem[4].skeleton->getPoint("1").pos;
I get the result: -0.002,-0.020,0.320

it is clear that the skeleton is loaded into the initial coordinates.

The coordinates of the mesh 29.641,17,-2.182.

Why are different coordinate?
06-07-2011 05:15 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #33
RE: question Game::Item
That's because the point uses local coordinates, not world coordinates, so think of it as being an offset to a position (the object's position) rather than an actual position. You need to transform the point into world coordinates like so:

Code:
point[1]=ObjItem[4].skeleton->getPoint("1").pos * ObjItem[4].matrixScaled();
06-07-2011 11:00 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #34
RE: question Game::Item
(06-07-2011 11:00 PM)Driklyn Wrote:  That's because the point uses local coordinates, not world coordinates, so think of it as being an offset to a position (the object's position) rather than an actual position. You need to transform the point into world coordinates like so:

Code:
point[1]=ObjItem[4].skeleton->getPoint("1").pos * ObjItem[4].matrixScaled();
Thank you very much !!! Well what in the world there are people like you!
06-08-2011 06:44 PM
Find all posts by this user Quote this message in a reply
Post Reply