No announcement yet.

Set Actor Rotation Replication

  • Filter
  • Time
  • Show
Clear All
new posts

    Set Actor Rotation Replication

    Hello. I have problem with rotation on client-side.The problem is character sometimes rotates sometimes doesn't . It acts by its pleasure. I didn't understand this. Why its happening ?
    And i added some projectile spawn forward to character. And when i press that key this code in the picture works after that i spawn a projectile(that has projectile movement.) as i said before.Also same, character sometimes rotates sometimes doesn't.But projectile spawns at the true(rotated) position.But character on the screen doesn't seems rotated.
    And project is Top-Down Template.

    Thank you very much.

    sevanberkay Your code is a little confusing. Are you holding Z and clicking the mouse at the same time?

    It might be better to make that Z into a LeftMouseClick.

    I always find that when things don't work in a weird way, like this, in fact they are working fine, but something I hadn't thought of is also occurring.

    In this case I would also look at a couple of things:

    1) Do you have other pawns? If so another pawn could be 'consuming' the click / Z. Have you set 'consume input' to false?

    2) What else could be consuming the click / Z?


      tib_hou thanks you for your reply.

      With that code im trying to get the mouse location.
      And when i press Z my character rotates to mouse location.
      And my character has TopDownController and The TopDown Character only this 2 blueprints.Hasn't got any Pawn.
      If pawn solves the problem. I don't know how to create and attach that pawn to character.Acctualy i don't know what pawn works for.



        sevanberkay Your character IS the pawn ( or should be ). The pawn is the thing that lives in the world.

        I don't know what's in 'RotationServer', will your player rotate with a simple SetActorRotation?


          tib_hou Yes with simple SetActorRotation.It works there is no problem with that but it sometimes rotates sometimes doesn't.


            sevanberkay I'm jot seeing obvious but had a long day. I'd recommend putting a print at each loin in the code and check u always get what u think u should get. Only a few nodes to debug... ☺