[Solved] Stop "set angle twoard" from rotating

0 favourites
  • 9 posts
  • dl.dropbox.com/u/44684026/scirra/Pinky.capx

    Is there any way I can stop Pinky from rotating when just using this default movement?

  • Can you share what behavior you're using? It's nice that you provided a .capx but it seems like the description has little to no details.

    If using bullet behavior, the object will rotate with the angle.

    If using CustomMovement behavior, the object will not.

  • Default movement.

    i.imgur.com/tZ4dyTC.jpg

    As you can see here, everything is working, except that she should ofc preferably not be rotating when chasing the "player".

    azylet.com/Pinky

  • Instead of 'set angl'e and 'move forward', use 'move at angle'.

    pinky.capx

  • If you select Pinky or whatever object you gave the movement behavior to (like a sprite bounding box, maybe) the behavior settings should show up in the properties sidebar. Look for "Set Angle". The default selection for it should be "360 Degree", so change it to "No".

    Hope that helps.

    EDIT: Nevermind, listen to ramones.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • To Ramones: That stops the rotating, but it also stops the animations working correctly as it's not picking up on the direction it's moving. :(

    ahr ech:

    The 360 degrees works in 8 direction movement, but I can't find an equivalent in the default movement where no behavior is set. I can make f.ex a path npc move around in the same'ish way, but for chasing i prefer this movement type. While i Could just place an animation sprite on top of the box to make it not matter if the box under it spins, this posed some issues with random spawning mobs which I was hoping to solve with this super simple chase method. And it was looking sooo great, until I hit this rotating bump in the road.

  • Ah yeah I wasn't paying attention. You can store the moving angle in a variable and use that to pick the correct animation. I updated that capx.

    A better solution would be to use bullet behavior on Pinky. You can set the image angle and the moving angle separately.

    *edit* the angle would be between -180 and 180 if you do it this way.

    *edit2* pinky_bullet.capx

  • ramones: That did it :) Tho a bit buggy, need to figure out why her "up" animation is not working with this setup now..

    Oh joy, more numbers!

    My absolute weak point is numbers, they mess with my head..

    This may be simple to most people, but I can count on two hands the amount of math classes I attended in school over the last 6 years when I was in school, and that's some time ago...

    Had a Lot of fun during last night figuring out the logic degrees for 8'way movement, especially fun when you have never owned a protractor and don't have a clue if it's 10, 0 , -10 or 10, 0 , -180 etc >.< Took me forever just to remember the Norwegian name of the protractor so I'd be able to google it..

    A previous project with 4-way movement demanded 0, 90, 180, -90. So it took a while before I thought of trying 0, 360 on this one >.<

    Thank you for the help tho, will start looking in to it.. :)

  • *edit2* dl.dropbox.com/u/8367729/construct/example/pinky_bullet.capx

    Thank you thank you thank you!!! :) bullet works lovely. Set the animations to loop and it's working great. Can finally start working on the next parts! :) Thank you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)