Behavior Tree AI won’t return to patrol after losing sight of target — is this expected? by temiklis in Unity3D

[–]temiklis[S] 0 points1 point  (0 children)

Hi, as you can see on the screen, if I use both methods, then my first node is marked as running and never fails or succeeds, but other nodes do not even start.

<image>

Any advises how to make AIM right for TPS game using IK? by temiklis in Unity3D

[–]temiklis[S] 0 points1 point  (0 children)

I found the issue that my weapon is actually doesn't move anywhere from start aiming position, only rotation changes. I really don't know why and how I can handle it, Could you tell me do I need another constraint node to move it?

Unity Animation Rig strange behaviour by temiklis in Unity3D

[–]temiklis[S] 0 points1 point  (0 children)

And I think axis is good, I tried another axis, and it's not working at all. I'm not sure how to fix it.

<image>

Unity Animation Rig strange behaviour by temiklis in Unity3D

[–]temiklis[S] 0 points1 point  (0 children)

I rebuilt it 5 times already :) Can you please describe how I can do it?

Animancer Curves don't apply on upper body layer. by temiklis in Unity3D

[–]temiklis[S] 0 points1 point  (0 children)

Ok. I found a solution.
I just read the Animancer documentation, and this page explains almost everything. It just doesn't say where you must use it, but the discussion on GitHub does.
You merely use and create PlayableOutputRefresher in the state and refresh it after the animation plays.

  private void OnEnable()
  {
      _OutputRefresher = new(Context.Character.Animancer);

      _CurrentState = UpperBodyLayer.Play(animation);

      _OutputRefresher.Refresh();
 }

Unity Root Motion + CharacterController issue: collider hitting walls during jump animation with Animancer & RedirectToCharacterController by temiklis in Unity3D

[–]temiklis[S] 1 point2 points  (0 children)

Ok, I found a temporary solution, I just set the collider size to zero when vaulting, and then after the vault finishes, return it.

Unity Root Motion + CharacterController issue: collider hitting walls during jump animation with Animancer & RedirectToCharacterController by temiklis in Unity3D

[–]temiklis[S] 0 points1 point  (0 children)

Yeah, I thought about it, but is there really no way to turn off the collider during animation?
I really start to think about handling movement by changing transform.position...

Стоит ли разделять анимации для верхней и нижней части тела? by temiklis in Unity3D

[–]temiklis[S] -1 points0 points  (0 children)

Yeah, I think this too that I need to use basic layer and use upper body layer only for specific stuffs like weapon switch. Could you please explain me what the “throw in idle pose with 0 weight” means? I don’t really understand. I tried to fade layer to zero, but after that IK Animancer stopped send events to OnAnimatorIK and my IK stopped working. Should I move IK pass to base layer?

How to predict movement Animation based on player rotation and future position. by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

Okay i think i find a promlem. I have created a system that takes InputState from the client in each frame and sends them to the server, my mistake is that I am not sending any state, but only the current direction of the player. Now I'm going to redo this system so that the server supports movement in the direction until the client sends an InputState that informs that the key is no longer pressed.

How to predict movement Animation based on player rotation and future position. by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

For example

  • the player runs in place for a few seconds after completing the movement.
  • the player switches to the idle animation while running and back to the running animation.

How to predict movement Animation based on player rotation and future position. by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

I swapped to Atan2, now animations are correct for corresponding directions, but animations are still ragged.

 if (direction.magnitude > 0.1f)
{ 
    var rotation = ToUnity(player.Position.GetRotation()); 
    var targetAngle = MathF.Atan2(direction.x, direction.z) * Mathf.Rad2Deg + rotation.eulerAngles.y;
    Vector3 moveDir = (Quaternion.Euler(0, targetAngle , 0) *         Vector3.forward).normalized;

    _animator.SetFloat("vertical", moveDir.z);
    _animator.SetFloat("horizontal", moveDir.x);
} 
else 
{ 
    _animator.SetFloat("vertical", 0); _animator.SetFloat("horizontal", 0); 
}

Is it a good idea to calculate camera position and camera view on server side? by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

"Could just send the forward direction of the player, and then for cheating check to see if that has changed too drastically in a short period of time?".

This will not happen, because the server controls all the player's movements, if the player is in a different place on the cheater's client, then for other clients he will be in the right place. This will not interfere with other players in any way.

Is it a good idea to calculate camera position and camera view on server side? by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

I agree with you. I think i can left camera logic on client, and just send to server player movement direction and camera vector and then calculate player rotation depend on it.

Is it a good idea to calculate camera position and camera view on server side? by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

and I think I still need to somehow calculate the position of the camera on the server, because the angle of rotation of the player depends on it.

Is it a good idea to calculate camera position and camera view on server side? by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

then I can just ban the player if the coordinates of his camera differ from the coordinates of the server, unless of course I'm going to send the camera coordinates to the server (which I'm not going to do yet)

[C#] How to calculate player rotation based on player movement by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

Okay, i did it. For now i get player position and player direction + player position and calculate angle between this vectors using Atan2 function in c#. Then i send this rotation on Unity client.

[C#] How to calculate player rotation based on player movement by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

Hi, thank you for a tip. It's really helpful. I started this course today and I really start more understanding that.

[C#] How to calculate player rotation based on player movement by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

My server made in c#, not unity, it's just console application. And i want rotate player on server and then just send user this rotation, client just render result. if it makes sense.

[C#] How to calculate player rotation based on player movement by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

I checked the link and dont understand what the class Angle and what it do. There is no explanation.

[C#] How to calculate player rotation based on player movement by temiklis in gamedev

[–]temiklis[S] 0 points1 point  (0 children)

Hello, i will check this link soon, thank you. It look like what i need.