Learning Photon Unity3D

appels
appels
edited July 2010 in DotNet
Hi,

I'm playing around with Photon and the Unity3D realtime demo.
I'm looking at changing the PlayerTransform.
Can someone guide me how to change the way the player moves.
Basicly i wan't the x value (horizontal axis) not to move to left or right but turn in the direction i want.
I tried adding :

playerTransform.transform.rotation = new Quaternion(0, player.posX, 0, 0);

But this doesn't seem to work how i want.
Can someone guide me to more specific info on the transform construction ?
Thanks,

Eddy.

Comments

  • This seems to be more a question about Unity scripting...
    When you detect an input for the horizontal axis, you need to change not the x position but add/substract some value from the rotation-value you want changed.
    If you want to send include the rotation in what you send across the network, you would have to add another value to the currently used event.
  • oh right indeed. Thanks for the quick reply :)