What is speed? How fast is it?

jb15jb15 Member Posts: 602
edited November -1 in Working with GS (Mac)
Is the "speed" entry in, for example, "move" behavior, per second? What is "speed?"

For example, if I say move 5 pixels at 180 degrees, does that actor move at 5 pixels per second, or what?

Comments

  • RHRH Member Posts: 1,079
    I don't think so, I was trying to work this out yesterday and I came up with the conclusion that to convert from 'speed' to pixels per second you need to multiply by 0.8835. I don't know if that is right but on an actor when the linear motion (X axis) was set to 100 it travelled from position 0 to 88.35 in one second.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    It should be pixel per seconds. I use the move behavior for a time bar and I get consistent result. For example if I put 40 on the speed field it will take 10 seconds to cover 400 pixels.

    ________________________________
    【ツ】iPhone Icon Pack【ツ】
    Free high score demo here (simple) and here (advanced)
  • LumpAppsLumpApps Member Posts: 2,881
    Mark is right I believe. I tested this before (and posted the result somewhere here ;)
  • jb15jb15 Member Posts: 602
    Thanks y'all. From the tests I've done, I think it's pixels per second to.
  • RHRH Member Posts: 1,079
    Huh, maybe move has a different result to altering self.motion.linearX or whatever it is.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    RH said:
    Huh, maybe move has a different result to altering self.motion.linearX or whatever it is.

    Where you counting in your head? You where only 12 pixels away from 100 in 1 second

    its quit possible you were off by 1/10th of a second
  • RHRH Member Posts: 1,079
    tenrdrmer said:
    Where you counting in your head? You where only 12 pixels away from 100 in 1 second

    its quit possible you were off by 1/10th of a second

    Hah, fraid not, not fussed though it turned out fine for what i needed
  • Rob2Rob2 Member Posts: 2,402
    running alongside an interpolate it certainly appears to be pixels per second for move and velocity
  • ChaserChaser Member Posts: 1,453
  • jb15jb15 Member Posts: 602
    I know I'm bumping an old thread, but this might help somebody.

    I've since needed to have a 180 degree turn done in one second. I kept using the "Rotate" behavior, with a 1 second timer, speed 180. This ended up doing more of a 185 degree turn (more than waas needed--I needed my rotation perfect). The magic number for a turn of this sort (180 using rotate behavior, in timer behavior of 1 second) was 177.

    So, in this instance, you multiply by 0.983333333. (177 / 180 = 0.983333333).
Sign In or Register to comment.