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
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 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_diff manipulating wrong angle vector? #385460
10/18/11 18:18
10/18/11 18:18
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Okay,

i created this function(hi otter^^):

Code:
function TrackHead(ENTITY* AEnt, VECTOR* APos)
{
	VECTOR LTemp;
	VECTOR LHeadPos;
	ANGLE LBoneRot;
	ANGLE LTotalRot;
	ANGLE LDiffRot;
	ANGLE LEntDiff;
	vec_for_bone(LHeadPos, AEnt, "Bone8");
	vec_set(LTemp,APos);
	vec_sub(LTemp, AEnt.x);
	vec_to_angle(LTotalRot, LTemp);
	ang_for_bone(LBoneRot, AEnt, "Bone8");
	ang_diff(LDiffRot, LTotalRot, LBoneRot);
	//ang_diff(LEntDiff, AEnt.pan, LBoneRot);//Nasty line
	ent_bonerotate(AEnt, "Bone8", LBoneRot);
	ent_bonerotate(AEnt, "Bone8", LDiffRot);
}



The problem is, commenting out/uncommenting the "nasty" line, changes the output result(final head rotation), while LEntDiff is never used.
Somehow it seems to manipulate LBoneRot o.O

EDIT: wtf noticed when doing

vec_set(GRot2, LBoneRot);//GRot2 is global

it changes LBoneRot too o.o.
Something absolutely strange is happening >.<.

Missuse of Vars..? I have no idea since i cant explain the behaviour.

Greetings
Rackscha

Last edited by Rackscha; 10/18/11 18:23.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: ang_diff manipulating wrong angle vector? [Re: Rackscha] #386069
10/27/11 19:07
10/27/11 19:07
Joined: Feb 2010
Posts: 483
in deinem Kopf
Otter Offline
Senior Member
Otter  Offline
Senior Member

Joined: Feb 2010
Posts: 483
in deinem Kopf
Let me push this. *push*

Has no one an idea, how to solve the problem?


Be my UBB-Buddy, without any reason!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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