sin formula, start position
gamesalad2016
Member, PRO Posts: 3
sin(|game.time|speed)distance+|start position|
How make RANDOM |start position| in this formula?
(+random(min, max)) does not work correctly
Comments
@gamesalad2016
what do you mean by start position? The position on the scene or the starting angle?
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
(+random(min, max)) does not work correctly
It works correctly, it's probably just not doing what you want it to do.
. . . . . . . .
How make RANDOM start position in this formula?
If you are after a random starting angle (?) the formula would look like this . . .
sin((game.time
*
speed)+random(0,360))*
distance+start positionIf you are after a random start position the formula would look like this . . .
sin(game.time
*
speed)*
distance+ random (A,B)(use whatever values you like for A and B to set the range for the random value)