0 Favourites

How do I rotate an object on its axis

  • 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.

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff
Unread hot topic
167 14,497
DMT2005's avatar
DMT2005
Unread hot topic
123 14,873
Zebbi's avatar
Zebbi