MrZone
MrZone
CC#
Created by MrZone on 10/7/2023 in #help
❔ Flip GameObject with Parent
Yo im using an GameObject for my Mele range, and i wanted to do it flip with my parent but my code is not working, i miss some transform. but idk how to use it on my script idk i tried this code (i use it on my spriterenderer, i changed the "spriterenderer." but i let it for the example)
void Flip(float _velocity)
{
if (_velocity > 0.3f)
{
spriteRenderer.flipX = false;
}
else if (_velocity < -0.1f)
{
spriteRenderer.flipX = true;
}
}
void Flip(float _velocity)
{
if (_velocity > 0.3f)
{
spriteRenderer.flipX = false;
}
else if (_velocity < -0.1f)
{
spriteRenderer.flipX = true;
}
}
after it was not working so i used this: gameobject.transform.setparent() but still no idk
17 replies