[quote:3clmpjbq]I guess this is the easiest way
That's quite neat. I'm over and over mesmerized what is already implemented in Construct.
You could use 'Apply impulse at angle' additionally to your 'set velocity'-event. Maybe you have to try different values to get it work.
I don't know which event do you use to 'kick' your box, but most events have the possibility to set an Image-Point where the force will hit. Make a second Image Point slightly of the center and use this Image-Point. Now your box should rotate.
If you really need that the box randomly tipping left or right you could add randomly 0.1 or -0.1 to the angle when the box is created.
PlayersObject| OnCreated -> PlayersObject| Set angle to PlayersObject.Angle+choose(-0.1,0.1) degree.
Now it should randomly fall to left or right.
That looks funny. Maybe some kind of bug or glitch. However, if you set the angle of your PlayersObject to other than 45 ist works.
Develop games in your browser. Powerful, performant & highly capable.
I tried something. Maybe there is a better way, but it works
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
Only two sprites at the same time can overlap, if there are more it doesn't work.
Try:
Global number rot = 0
Keyboard| On Space pressed -> System| add 180 to rot
Block| Invert(is clockwise from rot) -> Block| Rotate 1 degrees clockwise
System| rot >= 360 -> System set rot to 0
Invert means that you Invert 'is clockwise from'
You have also to increase the 'Max fall speed' . The gravity in the Platform-Behavior is only the acceleration. If your leaf has reached the 'Max fall speed' increasing the gravity will do nothing.
One hint, if you set the gravity negative your leaf will float up. Maybe you can use that for a gust or something like that.
— le Canapin
Have you tried it without the pin behavior?
I see no reason to use that if you set the position every tick.
[quote:2fplv57l]Thanks but is the rotation behavior not to overpowered?
I don't think that it will have an effect of memory or performance. First, that are only a few bytes, second, I hope that developer of Construct knows best to make something like that most efficient.
Google Chrome on Desktop has a 'Device Mode' to test different mobile resolutions. Hit F12 and in the window that comes up click on the second Icon from the left on the top of that window. Now you can choose different device resolutions.
https://developer.chrome.com/devtools/docs/device-mode
Hope that will help.
I would use the rotate- and the timer-behavior for your circle.
System| Every 15 seconds -> Sprite| Set Rotate speed to 'fast' degrees per second -> Sprite| Start Timer "SlowDown" for 5.0(Once) Sprite| On Timer "SlowDown" -> Sprite| Set Rotate speed to 'normal' degrees per second [/code:26gcq14q] normal and fast are your values.
Member since 31 Jul, 2015