PDA

View Full Version : about TBGL getting rotations



Dev2Fun
05-04-2009, 20:23
Ive a question to Petr Schreiber:
Is it possible to make a three new keywords?

to get angle between the position of one entitie and the local coordinate of another.

For exemple entity A is positionned at 0,0,0; entity B is positionned at 0,2,2 and is looking at 0,0,4.
Axe around turning is local B x and axe reference to start turning is local B z.

The value would be 3*M_Pi/2 or M_Pi/2 (because of the direction of the rotation)
( Thanks to thinbasic and to Petr Schreiber)

Petr Schreiber
05-04-2009, 21:00
Hi,

thanks for the suggestion.

Did you checked the following functions?:
TBGL_EntityGetAngleXY
TBGL_EntityGetAngleXZ
TBGL_EntityGetAngleYZ

It returns angle between two entities in given plane. You can see it used ( for example ) in:
SampleScripts\TBGL\TBGL_0220_Samples\ControlTargettingAndInfo

Returned angles are in degrees.
I think it is basically what you wrote about, if not, please give me more details and I can work on it.


Thanks,
Petr

P.S. It is little more comfortable for me when you post suggestions directly in "Suggest new features" (http://community.thinbasic.com/index.php?board=36.0) subforum of TBGL module, I can easily check what is done and what I forgot :)

Dev2Fun
06-04-2009, 01:17
Could i send you my project to show you what am i looking for?

Petr Schreiber
06-04-2009, 08:23
Sure,

please attach it here if possible.


Thanks,
Petr