unity – Making animations not smooth while using Record button

In my 2D sidescroller game, I want to separate the animations for the head and the body of my character.

While idling, my charcter’s body bounces slightly up and down (kind of a breathing motion). Thus, the head should keep up.
However, when I press Record and make adjustments for the head, the head moves up and down smoothly instead of following the body frame by frame.

How can I remove the smooth transitions from one position to the other?

Here is a screenshot from Unity demonstrating the hierarchy and the animation keyframes.
enter image description here

How can you sync video files with animations within Unity?

I’m wondering if anyone might be able to offer some advice regarding an issue I am currently facing in trying to sync video files with animations within Unity.

Ideally my aim is to have a video file play whilst an animated camera (exported from blender) moves in sync with the rendered video file. I’ve nearly got this working, however there is a very slight delay between the two in which at certain points (quick rotations of the camera) the animation lags behind the video.

I’ve tried a number of methods to try to ensure that the animation frame playing is the exact same as the current video frame, and whilst this appears to be the case with regards to the information returned in the console, in the game view there is clearly a discontinuity.

Does anyone have any ideas as to how this might be solved?

Thanks.

How can you create segmented sprite animations in Unity?

I've been looking for ways to design characters and I'm interested in this technique. It is used in many retro games, mainly for bosses like Gunstar Heroes (Seven Force, this one block type from Level 1), Castlevania (Talos) and Mischief Makers. It is used for the player character in the case of Yoshis Story, Paper Mario and more recently Hardcore Mecha.
I am currently familiar with the Anima 2D system in Unity. However, this more closely mimics 3D model functionality by warping the meshes, and does not appear to support sprite sheets per link.

I am considering using individual quads per link with their own sprite sheets. Would it be difficult to code my own skeletal system?

For anyone who is still curious / confused about what I'm referring to, this technique has been used quite a lot in Castlevania games or Treasure games.

Unity ScrollRect many objects and animations in canvas

I actually have two questions. Which are connected to each other in my case.

  1. I have a correct scroll setup and over 1000 objects to scroll. I currently instantiate all 1000 objects at once and notice that fps are falling. I use 2D mask and Disbale Pixel perfectly. Both gave a boost in performance, but I still think the bottleneck is that I've already created 1000 objects on the scene. Instead, create what is visible to the eye.

What can I do? I looked in pools. But I couldn't get it to work with my setup. Where I loop onStart through the list of objects and then instantiate them.

  1. After solving the first question, I want to animate these objects. Since these are different player outfits with button components that you can click to buy. And buttons only work inside the canvas and the animator doesn't seem to work inside a canvas. But animate perfectly outside of a canvas.

Should I have these game objects (outfits) inside a canvas or should I have them outside the canvas and use Raycast to get onClick functionality. What is recommended in terms of performance.

Unit: How to prevent animations from twitching in combination with Navmesh Agent

I'm trying to create a third person shooter in Unity and implement a zombie that follows the player. When he approaches the player, an attack animation is played. I use the NavMesh agent for this purpose. But I am faced with the problem that as soon as the zombie approaches and the player moves back or to the side, the zombie twitches and the transition between the walking and the attacking animation appears interrupted. It also glides on the floor around the player. Here is the video of it:
Video
Here is my code to control the zombie movement:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class ZombieController : MonoBehaviour
{
    public Animator animator;
    public NavMeshAgent agent;
    public GameObject player;

    public float turnSmoothing = 15f;          
    public float speedDampTime = 0.1f;
    private const float stopDistanceProportion = 0.1f;

    private int health = 100;

    private PlayerContorller pc;

    // Start is called before the first frame update
    void Start()
    {
        agent.updateRotation = false;
        agent.SetDestination(player.transform.position);
        agent.isStopped = true;
        pc = player.GetComponent();
    }


    // Update is called once per frame
    void Update()
    {
        agent.SetDestination(player.transform.position);

        if (agent.pathPending)
            return;
        float speed = 0.0f;
        if (!pc.Dead)
        {
            if (agent.remainingDistance <= agent.stoppingDistance * stopDistanceProportion)
            {
                agent.isStopped = true;
                animator.SetBool("PlayerClose", true);
                Quaternion targetRotation = Quaternion.LookRotation(player.transform.position - transform.position);
                transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, turnSmoothing * Time.deltaTime);
            }
            else if (agent.remainingDistance < 70.0f)
            {
                Quaternion targetRotation = Quaternion.LookRotation(player.transform.position - transform.position);
                transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, turnSmoothing * Time.deltaTime);
                float proportionalDistance = 1f - agent.remainingDistance / agent.stoppingDistance;

                speed = Mathf.Lerp(0.5f, 1f, proportionalDistance);
                agent.isStopped = false;
                animator.SetBool("PlayerClose", false);
            }
            else if (agent.remainingDistance < 100.0f)
            {
                Quaternion targetRotation = Quaternion.LookRotation(player.transform.position - transform.position);
                float proportionalDistance = 1f - agent.remainingDistance / agent.stoppingDistance;
                transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, turnSmoothing * Time.deltaTime);
                speed = Mathf.Lerp(0f, 0.5f, proportionalDistance);
                agent.isStopped = false;
                animator.SetBool("PlayerClose", false);
            }
        }
        else
        {
            agent.isStopped = true;
            animator.SetBool("PlayerClose", false);
            speed = 0f;
        }
        animator.SetFloat("Speed", speed);
    }

    public void Hit()
    {
        health -= 10;
        if(health == 0)
        {
            animator.Play("Die");
            StartCoroutine(Die());

        }
    }

    IEnumerator Die()
    {
        yield return new WaitForSeconds(10);
        Destroy(gameObject);
    }
}

The Speed Parameter controls idle (if 0), walking (0-0.5), running (0.5-1) of the zombie, all three are part of a hybrid tree. And if that PlayerClose The parameter is set to truethe animation changes to attack animation.
How do I fix it? What changes need to be made to fix this?

facebook – About posting GIF animations

If you base64 encode a GIF animation encoded with shareAsync () from FBInstantGameAPI v6.2, the GIF animation will be played when posting via a PC browser, and the GIF animation will not be played when posting via the Facebook app.

There is no difference in implementation between PC and smartphone.

Please let me know if anyone knows how to solve this problem.

04/18 – Missing animations – Ask Ubuntu

I have just installed Ubuntu 18.04.4 (actually a few times) and still find that all animations are missing. Ubuntu deactivated them immediately after installation or they disappear after a while. I checked optimizations, it says the animations are enabled, but they just don't show up. Anyway, I can't figure out how to turn it on. If someone could help me, I would be very happy. https://drive.google.com/open?id=1TfQM7LLuda53tB7uGSenBn-10hiLXOQQ

Animations – Can I upload a GIF larger than 480px to a Facebook post?

I'm trying to upload a GIF to a Facebook post. The original GIF is 414 x 614 pixels. After uploading it, I understand that it will be converted automatically and the resulting size is so small that the text on the GIF is unreadable. I also tried uploading the GIF to GIPHY and there I can see that the uploaded file is 324×480 (slightly larger than the Facebook post and almost readable but not as much as I need).

Is there a way to upload the GIF in its original size to a Facebook post?