Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 1,275 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | chip programmers | 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