Hello

I'm very new to Makinom and ORK but i really like what i see so far

I figured i'd start out with something relatively simple but i've been trying and failing at this all day

I use the unity input manager and get axis so i can add force to my rigidbody2d. This works perfectly but i can't figure out how to get the sprite to face it's direction of movement

Are there any tutorials somewhere or would someone more knowledgeable than me be so kind as to steer me in the right direction

Thank you
  • edited May 2016
    I should add that what i've been trying to do is this

    Store velocity
    Atan2(velocity.y, velocity.x)*Rad2Deg

    But then i'm stuck. I've tried all the various rotation nodes but i just can't seem to get the result i'm looking for


    I figured it out and i'm kind of embarrassed. Turns out i was using position rather than velocity for my calculation. As soon as i changed that it works
    Post edited by jn2002dk on
  • When working with sprites, you'll probably not want to rotate the game object. For sprites, you have to manage this through animations or (if it's a side scroller) through negating the scale.

    An example for side scroll handling can be found in the 2D Platformer tutorial series - check out the Flip schematic found here.

    For top-down, it's a bit more complex - you'll have to determine the direction from the player's input (up-down, left-right) and play the according walking animation.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.