How do I rotate an object on its axis

0 favourites
  • 4 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • Hello everyone,

    I recently started with Construct 2 and it has been great so far seeing how much it can save time and facilitate the prototype process.

    I have been trying to solve this issue and I tried to check numerous resources but for some reason I just can't quite crack it.

    I simply need to rotate an object with a bullet behavior when I spawn it. I have tried the Rotate angle behavior which has caused the bullet to simply change trajectory.

    I also tried something like self.Angle + 45 * dt but still the direction changes.

    Can this be done without having to use animation ?

    Thanks

  • Don't have C2 right now so I only rely on the manual

    You need to set the parameter of the bullet behavior "set angle" to no, then you can rotate it as you wish without affecting the trajectory

    Set angle

    If set to No, the behavior will never change the object's angle. If set to Yes, the behavior always sets the object angle to the angle of motion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The options ...

    Set Angle in the Bullet behavior on/off combined with:

    Rotate by changing the self.angle

    Rotate by changing the self.Bullet.AngleOfMotion

    Rotate by the behavior.

    https://www.dropbox.com/s/g27wmouy2jh7w ... .capx?dl=0

  • Don't have C2 right now so I only rely on the manual

    You need to set the parameter of the bullet behavior "set angle" to no, then you can rotate it as you wish without affecting the trajectory

    Set angle

    If set to No, the behavior will never change the object's angle. If set to Yes, the behavior always sets the object angle to the angle of motion.

    Thank you for the rapid reply.

    When I set the angle to "No", I started having spawning issues. I have a canon that shoots objects from its set image point. As you can see in the quick note I attached, the objects no longer spawn as needed.

    dl.dropboxusercontent.com/u/689 ... 0Angle.jpg

    Here is how I spawn the objects:

    dl.dropboxusercontent.com/u/6896957/Spawn.png

    where throwpower is a positive number.

    Regards,

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