Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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