Movement using mathematical formula (Trigonimos)

A level in 2015 was launched called Trigonimos. I saved it because it had lots of interesting stuff in it. Unfortunately because the lineage system is broken with the servers off I do not know the name of the creator. If you know it then please comment below, I like to give credit.

Movement in the vertical (up and down)

  1. WHEN [once] DO [vectorvar:position][equals][me][position]
  2. …WHEN DO [numvar:movement multiplier][equals][2] // this number controls the height of the rise and fall (same in each direction)
  3. …WHEN DO [vectorvar:target][equals][me][position]
  4. WHEN DO [num var:per frame increment][increment by][3] //this number affects the speed of the rise and fall
  5. …WHEN DO [vectorvar:target][y][equals][vectorvar:position][y][plus][(][sine][numvar:per frame increment][multiplied by][numvar:movement multiplier][)]
  6. …WHEN DO [move][toward][vectorvar:target][with strafing][with flying][min distance][0]

Movement in the horizontal (left and right)

Same as above except

5. …WHEN DO [vectorvar:target][x][equals][vectorvar:position][x][plus][(][cosine][numvar:per frame increment][multiplied by][numvar:movement multiplier][)]

Orbiting

If you use both sine and cosine your object will rotate around its central position

  1. WHEN [once] DO [vectorvar:position][equals][me][center]
  2. …WHEN DO [numvar:movement multiplier][equals][2] // this number controls the distance of the orbit
  3. …WHEN DO [vectorvar:target][equals][vectorvar:position]
  4. WHEN DO [num var:per frame increment][increment by][3] //this number affects the speed
  5. …WHEN DO [vectorvar:target][y][equals][vectorvar:position][y][plus][(][sine][numvar:per frame increment][multiplied by][numvar:movement multiplier][)]
  6. …WHEN DO [vectorvar:target][x][equals][vectorvar:position][x][plus][(][cosine][numvar:per frame increment][multiplied by][numvar:movement multiplier][)]
  7. …WHEN DO [move][toward][vectorvar:target][with strafing][with flying][min distance][0]

 

 

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: