Author Topic: Recoil/moving camera view  (Read 677 times)

How to I move camera view client sided sortof like recoil

Try messing with the pitch(x) and yaw(x) functions.

Try messing with the pitch(x) and yaw(x) functions.
I was thinking about that but I don't really have much understanding about client sided how would I begin to start?

Start by typing those in console and replacing the Xs with numbers until you figure out how it works.

nonononono I mean am I supposed to go like %client.yaw(2) in the client or how would i modify the yaw for example in client sided

Nope.

yaw(90);
Would turn the camera 90 degrees right (or left, not sure).

pitch(90);
Would make the camera look straight up (I think).

yes i know this im talking about the actual script
I have no idea what i am doing
Code: [Select]
function clientcmdturn(%client)
{
%client.yaw(50);
}

The snippet you just posted is incorrect usage, it is simply yaw(50); - no object is used.

ok how would I call this through server now?

on the client:
Code: [Select]
function clientCmdTurn(%flag)
{
yaw(%flag);
}

on the server:
Code: [Select]
function GameConnection::Turn(%this,%flag)
{
commandToClient(%this,'turn',%flag);
}
findClientByName(Greek2me).turn(50);

Keep in mind that this is very impractical, because the client needs a mod in order for it to work.

If you wanted to do it server-side just use the method T+T uses, it would require much less data transfer and would not require a client-sided mod to work.

T&T shoots a second, invisible projectile at the player I believe, causing the recoil. I think he wants to actually turn the camera though.

T&T shoots a second, invisible projectile at the player I believe, causing the recoil. I think he wants to actually turn the camera though.
Yes, But I have got a snippet of code from gravity cat form one of his weapons that may work I will have to see
« Last Edit: October 12, 2011, 06:09:09 PM by swollow »