Announcement

Collapse
No announcement yet.

Server and Client has different Transform of an Actor Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Server and Client has different Transform of an Actor Component

    Hello

    I have an Actor with an attached Gun. But it has a different Location on the server than on the clients. What can be the reason for this?
    Also if I attach the Gun with a Childactor the same problems appears. The gun is simply replicated.
    The Character itself has the same locations everywhere.

    LogBlueprintUserMessages: [Unit_BPC_74] Server: Translation: X=929.988 Y=-716.238 Z=133.068 Rotation: P=-47.488949 Y=-97.425323 R=73.608810 Scale X=1.000 Y=1.000 Z=1.000
    LogBlueprintUserMessages: [Unit_BPC_74] Client 1: Translation: X=959.090 Y=-746.764 Z=162.925 Rotation: P=-1.125813 Y=-93.377518 R=1.940288 Scale X=1.000 Y=1.000 Z=1.000
    LogBlueprintUserMessages: [Unit_BPC_74] Client 2: Translation: X=958.646 Y=-746.449 Z=161.762 Rotation: P=-1.063945 Y=-94.554192 R=3.587189 Scale X=1.000 Y=1.000 Z=1.000

    Again thanks for your help.

    Edit:
    The Animation was not the problem for the different hitresults.
    Last edited by Phoenix100; 10-08-2017, 07:01 AM.

    #2
    Originally posted by Phoenix100 View Post
    Hello
    I have an AI Actor with an idle Animation, and he has a gun. Now If this AI character shoots, he sets the focus to the target and the projectile launches from a socket attached to the weapon.
    Because of the Idle Animation the weapon is moving and the projectile is not hitting the target, (I think that's the problem). I've also tried to calculate the aiming with SuggestProjectileVelocity but I would need to stop to animation of the upper body?
    What is the best practice for AI shooting over longer distances?
    1. Use trace for hit location
    2. Use "look at rotation" (hit) rotator
    3. As spawn location set your socket location, as rotation -> result from "look at rotation" node
    4. Profit

    Comment


      #3
      Originally posted by Name368 View Post

      1. Use trace for hit location
      2. Use "look at rotation" (hit) rotator
      3. As spawn location set your socket location, as rotation -> result from "look at rotation" node
      4. Profit
      Thanks a lot for your answer. As it seems, the animation was NOT the problem. The Server has another location of the attached weapon and that seems to be the reason for the wrong hit result. But why?




      Comment

      Working...
      X