it's a good idea to take the random number from algodoo. i once made a function for a random number using math.mod
btw the random color in algodoo is not truly random. it uses an algorithm to simulate randomness and so does every computer program. if you know the algorithm you can predict the "random" numbers.
then i didn't get what you explained first. i thought you mean to fly directly to the target. because then timeX and timeY would be the same.
but now that you additionally added some information it makes sense.
@gargamel4o
it detects how the position of the mouse is changing every time step and then the angle of the position change is calculated. then for angles bigger than 315° or smaller than 45° it displays "right", for smaller than 135° it displays "up", etc...
vel := [10 * scene.my.angle2(0), 10 * scene.my.angle2(1)]
just use
vel := 10*scene.my.angle2
it slims down the code and you can keep track of the whole scripting code a lot better.
And watch out for atan. it can't give you all angles. but because a box is symmetric it is okay in this case.
The "important" message is dangerous. if you adjust the frequency and don't set it back to 100Hz every simulation you play back will be wrong or in the worst case won't work just btw.
thanks. normally it isn't possible with any other variables but because the functions in the console and app.mousepos are updating all the time it's possible.
you didn't understand RA2lover. he wasn't talking about changing the monitor's refreshing rate.
he said: although you change algodoo's frequency the frequency of the lasers won't change which is the refreshing rate of your monitor.
it's infinite fuel but you must not move to spawn fuel. if you're already moving it's just a finite amount you can use. spawn fuel with object's velocity.
i like the idea of using flaps. it's really cool. but on the other hand the wiggle doesn't look very good. but i know it's a lot of additional work to turn it off.
but i like it. i'm working on a formula to take acceleration into account, too. just now i wanted to test it with RA2lovers rocket. i already made a formula just with velocity and with it the rocket is more precise. let's see if it works. if it's going to work it has got a precision of nearly 100% at any motion of the target and you can turn gravity as high as you want to. wish me luck
yeah of course thruster force has to be greater than gravitational force. i appreciate this.
btw. the formula works. now i can make it even more precise if i take jerk into account.
the laser gets activated remote-controlled and after one hit it deactivates itself which results in one q per key press.
but if you want to make more keys it's better to do it directly via onCollide because you don't need custom variables for the remote-control again and again.
spawning the circles with e.normal as velocity doesn't work very well because they only have got a speed of 1m/s no matter how fast your rocket is. e.normal is a unit vector. it only can give you the direction of your needed speed but nothing more.