Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → VectorY
VectorY
2002-02-05, 11:42 PM #1
I am having difficulties with this evil vectorY stuff... What I'm trying to do is set the players look half way between what he really moved in 0.1 secs.... So I:

Code:
setpulse(0.1);

pulse:
pulse:
   playerz_1 = VectorY(GetThingLvec(player));
   sleep(0.05);
   plrotation = VectorSet(VectorX(GetThingLvec(player)), ((VectorY(GetThingLvec(player)) - VectorY(playerz_1)) / 2) + VectorY(GetThingLvec(player)), VectorZ(GetThingLvec(player)));
   SetThinglook(player, plrotation);
   Return;



The problem is my Y axis keeps going back to 1.0 or -1.0... what am I doing wrong [http://forums.massassi.net/html/frown.gif]

(sorry for the scroll)


[This message has been edited by Hellcat (edited February 06, 2002).]
Team Battle.
2002-02-05, 11:58 PM #2
From a simple point of view, what you actually doing is

VectorY(VectorY(GetThingLVec(player)));

for playerz_1.

------------------
http://millennium.massassi.net - Millennium
Sniper Arena! - Enhancement Pack!
2002-02-06, 12:01 AM #3
Also how can I rotate the view point as if you we're leaning on way?
Team Battle.
2002-02-06, 12:06 AM #4
Actually I think I am using the playerz_1 and then 0.05 seconds later taking the current vectorY of the Lvec then taking the 2 deviding by then adding the original vector? (thats what I'm sposed' to do [http://forums.massassi.net/html/wink.gif] I'll just see if thats the problem)
Team Battle.
2002-02-06, 12:08 AM #5
Oh, I see what your saying... your 200% right

//me hits myself in the head
Team Battle.
2002-02-06, 12:17 AM #6
Ok, quick code update... this one makes me rotate to 90 degress to last time... grr

Code:
   playerz_1 = GetThingLvec(player);
   SetPulse(0.1);

pulse:
   If (VectorY(playerz_1) == VectorY(GetThingLvec(player)))
   {
   	Print("The same");
   }
   else
   {
   	plrotation = VectorSet(VectorX(GetThingLvec(player)), ((VectorY(GetThingLvec(player)) - VectorY(playerz_1)) / 2) + VectorY(GetThingLvec(playerz_1)), VectorZ(GetThingLvec(player)));
   	SetThinglook(player, plrotation);
   }

   playerz_1 = GetThingLvec(player);
   Return;


Any thing else that could cause this?
Team Battle.
2002-02-06, 12:47 AM #7
Sorry, but I laughed a bit [http://forums.massassi.net/html/wink.gif]

You did quite a same mistake.

GetThingLVec(GetThingLVec(player));

I think you meant either VectorY(GetThingLVec(player)) or VectorY(playerz_1).

------------------
http://millennium.massassi.net - Millennium
Sniper Arena! - Enhancement Pack!

[This message has been edited by Hideki (edited February 06, 2002).]
2002-02-06, 4:04 AM #8
The x, y, and z directions do not rotate with the player. They are constant.

It seems that all you want to do is make the player turn more slowly. So just use:
Code:
	ParseArg(player, "maxrotthrust=90");


The normal maxrotthrust setting is 180 and 90 cuts it by half. Does this do what you want?


------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-06, 5:45 AM #9
In that case you'll want to use SetPhysicsFlags(player, [0x1000 or 0x200, I can't remember which it is]). The problem with using the mouse is that you can rotate at unlimited velocity, and setting one of those Physics flags will make that impossible.
Dreams of a dreamer from afar to a fardreamer.
2002-02-06, 5:36 PM #10
Arg, Hideki thanks for that [http://forums.massassi.net/html/smile.gif]

SM the problem with that is that when you move the mouse it stays at the speed... that only works on the keys. Fardreamer I shall try that. Thanks for the help!
Team Battle.
2002-02-06, 5:54 PM #11
hmm, Fardreamer your right... that works. Thanks!
Team Battle.

↑ Up to the top!