How do I rotate and move object at the same time

0 favourites
  • 5 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I'm trying to make an event when the spacebar is held down, spin an object around my player object. I can move around perfectly with 8 direction behavior. As soon as the spacebar is held down, the secondary object starts rotating around as it should, but seems to shut off my movement. When the spacebar is released, I can move again. Any ideas what's conflicting? Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We'll need to see your event sheet to troubleshoot this. Can you post a capx?

    An very unlikely possibility is that on some keyboards certain keys can't be pressed at the same time.

  • Sure, here it is

    w w w dot dropbox.com/s/ailjjcxueirwqjp/Roelda.capx?dl=0

  • That's a little different - your player object is doing the spinning, not an object spinning around your player.

    8 direction behavior works based on setting the angle/direction of your player sprite, so if you change the player sprite's angle with events, it fights against your 8 direction behavior.

    If you want your player sprite to spin and move with 8 direction, you can try using an animation for the spin.

    Or have another separate sprite object pinned to your player sprite, that should be able to spin no problem while the player sprite moves.

    A third way would be to have your player with 8 direction be invisible as a placeholder, and pin a sprite on top of that with the graphics and have that spin. (Same idea as second method)

  • Ah, I forgot I was trying a second sprite and trimmed it down to one. It's been a few days since I worked on it. Doh! lol. Anyway, that works brilliantly! Thanks much for the suggestions.

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