Gamestudio Links
Zorro Links
Newest Posts
long time to load data
by qin. 12/31/25 09:57
The new evaluation shell
by jcl. 12/29/25 09:56
about Zorro S (monthly)
by AndrewAMD. 12/29/25 03:24
Xor Memory Problem.
by TipmyPip. 12/26/25 19:14
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Quad, Jack_Zodiac), 3,316 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ang_for_bone #341171
09/12/10 18:26
09/12/10 18:26
Joined: May 2006
Posts: 148
Latvia
MTD Offline OP
Member
MTD  Offline OP
Member

Joined: May 2006
Posts: 148
Latvia
Hello,

Trying to understand how this works "ang_for_bone", but have some problems.

First I wanted to check bone angles by this function.
So I call ang_for_bone(theTempANG,theEntity,"theBone")
Then I try watch the angles by theTempANG.pan,theTempANG.tilt,theTempANG.roll

Now I try to rotate the bone angles and watch how much the bone is rotated.
ent_bonerotate(theEntity,"theBone",vector(time_step,0,0));

But I can't read the pan angle ???
(It looks like the pan angle is written in tilt angle, because if you rotate the bone by x or y the tilt angle only changes)

The result:
If rotate by x:
ent_bonerotate(theEntity,"theBone",vector(time_step,0,0));
result is in theTempANG.tilt

If rotate by y:
ent_bonerotate(theEntity,"theBone",vector(0,time_step,0));
result is in theTempANG.tilt

If rotate by z:
ent_bonerotate(theEntity,"theBone",vector(0,0,time_step));
result is in theTempANG.roll

Re: ang_for_bone [Re: MTD] #341202
09/13/10 08:53
09/13/10 08:53
Joined: Jul 2000
Posts: 28,044
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,044
Frankfurt
Normally, all 3 angles - pan, tilt, roll - are affected. The returned bone angle is absolute - the entity orientation also adds to it. So it's not the same angle that you use for rotating the bone. For instance, if you rotate the entity by 90 degrees, pan can become tilt dependent on which axis is used for the rotation.


Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1