Set "Prevent rotation" as a action in Physic beh.

0 favourites
  • 5 posts
From the Asset Store
Alot of High Quality Items sound effects for your game!
  • Would it be possible to add "Prevent rotation" as action in physics behahvior,

    So you can change it in runtime?

    One reason for this would be, that I would want a family/object to be able to rotate in one layout (ex normal mode), but disable the rotation in another layout (ex easy mode), and without having to create a second family/object.

  • You could just set a boolean instance variable, then whenever this is true, set angular velocity to 0.

  • sqiddster

    Thanks for the tip, but it doesn't work to 100%. A object can still rotate, even though its not by much.

    Disabling the rotation directly in the physics engine would be a much better option, because the physics still calculates the rotation, even if I set the angular velocity to 0 every tick.

  • That is true... However until this feature is implemented I would suspect that is the only thing to do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, its a good temporary solution.

    But I went ahead and I created my own function to handle this. And it works perfectly.

    If anyone is interested in this function as well, I added it to my plugin. So go to System Manager plugin, or click on this link. The function is called "Allow physics rotation".

    Man, I just love the Construct SDK! So much cool stuff you can do with it!<img src="smileys/smiley1.gif" border="0" align="middle">

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