- Home /
Question by
Kocakali · Jul 21, 2020 at 10:15 AM ·
scripting problemscript.charactercontrollerflip
How do I change the scale character for flip his face,How do I change the scale of character for flip his face
{ Rigidbody2D playerRB; public float moveSpeed = 3f;
bool facingRight = true;
// Start is called before the first frame update
void Start()
{
playerRB = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
playerRB.velocity = new Vector2(Input.GetAxis("Horizontal") * moveSpeed, playerRB.velocity.y);
if (playerRB.velocity.x < 0 && facingRight)
{
}
else if (playerRB.velocity.x > 0 && !facingRight)
{
}, Rigidbody2D playerRB;
public float moveSpeed = 3f;
bool facingRight = true;
void Awake()
{
}
// Start is called before the first frame update
void Start()
{
playerRB = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
playerRB.velocity = new Vector2(Input.GetAxis("Horizontal") * moveSpeed, playerRB.velocity.y);
if (playerRB.velocity.x < 0 && facingRight)
{
}
else if (playerRB.velocity.x > 0 && !facingRight)
{
}
}
Comment
Your answer
Follow this Question
Related Questions
Fliping character 180 degrees when moving left 1 Answer
Character controller (3d) don´t move whith a moving platform. 1 Answer
Why when using get; set; in one script i'm getting null in other script that use it ? 1 Answer
How to detect if two objects become a square ? 1 Answer
How do i use a public sealed class to create objects and destroy them ? 0 Answers