Author Topic: Changing a clients yaw/pitch?  (Read 958 times)

Is it possible to change the clients yaw/pitch from the server side?

%player.setTransform(%pos SPC %rot);

%player.setTransform(%pos SPC %rot);
How would I lift the players pitch in the direction the players facing?


What
Rephrasing:
How would I make the player look up a certain amount of degrees?

Rephrasing:
How would I make the player look up a certain amount of degrees?

Create an AIConnection, make it control the player and use aiConnectionObject.setMove( "pitch", rate );

Create an AIConnection, make it control the player and use aiConnectionObject.setMove( "pitch", rate );
But wouldn't than make the players screen go all stuffty because something else is controlling them?

But wouldn't than make the players screen go all stuffty because something else is controlling them?

Yes.
Due to client sided prediction, there is no way for the server to turn the client without it looking "stuffty"

setTransform would just snap the players view to that rotation. You could do some math and have it do multiple setTransforms to create a more gradual effect

setTransform would just snap the players view to that rotation. You could do some math and have it do multiple setTransforms to create a more gradual effect

You cannot modify anything except for Z rotation with setTransform.

You cannot modify anything except for Z rotation with setTransform.
why?

why?

Don't ask me why, you just can't.

You cannot modify anything except for Z rotation with setTransform.

Er, to be more precise, that only applies to players.

Don't ask me why, you just can't.
I think you can while the player is tumbling

I think you can while the player is tumbling

you'd be changing the pitch of the tumble vehicle, not the player

why?
Because player objects in Torque have Axis-Aligned Bounding Boxes, which means they cannot be rotated on any planes besides Z. If you think about it, setting the players rotation on another axis would literally turn the player, much like if you drive a jeep up a ramp. This isn't what you're looking for: you want them to look up, not magically rotate so they can see upwards while planking at a 45 degree angle. Vehicles, on the contrary, have Oriented Bounding Boxes. They can freely rotate on all 3 axes, so you can use setTransform() to make them turn in wild directions.
« Last Edit: December 26, 2012, 06:08:59 AM by Trinick! »