Answer the question
In order to leave comments, you need to log in
How to remove the "trail" behind the character's sprite when moving?
When the character moves, a "tail" appears behind him, but if you greatly reduce the speed, the trail disappears, there is no trail in the animation of the sprites themselves, it appears only in motion. How to make it so that there is no trail when the character moves?
Character movement code:
public float moveSpeed = 5;
public Animator animator;
public Rigidbody2D RB;
vector2 movement;
// Update is called once per frame
void Update()
{
movement.x = Input.GetAxisRaw("Horizontal");
movement.y = Input.GetAxisRaw("Vertical");
animator.SetFloat("Horizontal", movement.x);
animator.SetFloat("Vertical", movement.y);
animator.SetFloat("Speed", movement.magnitude);
}
void FixedUpdate()
{
RB.MovePosition(RB.position + movement * moveSpeed * Time.fixedDeltaTime);
}
Answer the question
In order to leave comments, you need to log in
If no trails or other things are hung on the object, then the cable is only from your monitor - i.e. low speed matrix.
According to the code, there are no questions except for the animator. Maybe a train in the animator itself somewhere - look for it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question