Gamestudio Links
Zorro Links
Newest Posts
Bug in train mode, or it seem to me
by jcl. 09/22/26 14:47
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 09/22/26 12:21
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 1,887 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Opus, Jubilee, lopezsergio07, mistery, lokkalyansamiti
19239 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,135
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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