Search Unity

Inverting location of an object based on pivot?

Discussion in '2D' started by theoyoshimura, Dec 15, 2019.

  1. theoyoshimura

    theoyoshimura

    Joined:
    Jul 3, 2019
    Posts:
    1
    Hello! I'm kinda new to game developing and I was looking to do a simple topdown shooter just to learn some core elements of Unity2D. I'm looking to do a melee attack, just like the video linked (Btw the guys developing this game are awesome!) :



    I know how to program the sword and the melee part, but I just don't know how they invert the position of the sword after each attack. Can anyone help me with that? Thanks!
     
  2. brandonnugraha298

    brandonnugraha298

    Joined:
    Jul 13, 2020
    Posts:
    1
    Maybe you could show the code so that I can help you?
     
  3. rarac

    rarac

    Joined:
    Feb 14, 2021
    Posts:
    570
    change scale and rotation of the sword