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 → Rotating the player via cog - is it possible?
Rotating the player via cog - is it possible?
2002-09-03, 1:53 AM #1
Is it possible to turn the player 180 degrees in a cog, without the player's specifically using any pitch keys? And if so, how would I accomplish this?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-09-03, 6:56 AM #2
With the player, it's difficult because his movement is exe-controlled. But if you want him to pitch 180 then:

Code:
SetThingRotVel(player, '180 0 0');
Sleep(1);
SetThingRotVel(player, '0 0 0');


This code won't work if the player is attached to a surface, because JK thinks that he must be standing upright on the surface. With SetThingRotVel(), you simply cannot modify the player's yaw - JK will stop any yaw movement shortly after it's begun.

I've read a lot of complaints about "limits" to JK's engine, but the truest limit for Cog that I've encountered is JK's timing inconsistency. A second (or its JK equivalent) is never exactly a second. A velocity of 1 JKU/sec is never really 1 JKU/sec.

This makes mathmatical calculations of velocity, time, and distance inherently incorrect. You'll find when using the code above, that your player won't always pitch 180 degrees; sometimes more, sometimes less, but most often more.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited September 03, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!