sinus support gamesalad?

wouterwouter Member Posts: 174
edited November -1 in Announce Your Game!
hi is there any sinus support in gamesalad?
i have to make a beautiful sinus that can have a different amplitudes...

if this is impossible how can i make a smooth curve as movement of the game character? (up and down)

wouter

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Yes, there are Sin and Cos trig functions in GameSalad. They're accessible through the Expression Editor.
  • wouterwouter Member Posts: 174
    ah thank you!!!!!!!!!!!!!!!!!!!!!!!!

    discovered a new function;)
  • wouterwouter Member Posts: 174
    @uptimistik
    ??? what's that (medical stuff?? xD)

    euhm i didn't get results.
    my character stays on 1/3 of the screen (camera control), so i didn't know if the x changed.
    so i created a game attribute x.
    also i created a timer-> every 0,2 seconds change attribute game.x to game.x+1.
    also in this timer:
    move-> direction = sin(game.x)

    but the character only went forward (and not in sinus curves).

    what to do???

    thanks
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    for waves and circular motions you need to use your sin and also your cos for y as well

    have a look at these:

    http://gamesalad.com/wiki/how_tos:gsc_wave_movement

    http://gamesalad.com/wiki/how_tos:gsc_circular_movement
  • wouterwouter Member Posts: 174
    thanks man i couldn't find the answer...
    had already searched in the wiki (and the cookbook and youtube...) only i didn't saw it... xD

    thanks!!!
Sign In or Register to comment.