maths: motion depending on time
Posted
by clamp
on Stack Overflow
See other posts from Stack Overflow
or by clamp
Published on 2010-06-10T13:34:18Z
Indexed on
2010/06/10
13:42 UTC
Read the original article
Hit count: 309
hello, i have a mathematical problem:
i have a function where the only parameter is the current time. the return should be a position which is used to place an object on a certain place.
int position(int time)
{
int x = 0; //TODO implement x depending on time
return x;
}
so basically the function is called every frame to put the object in motion.
the motion should look like this (this is the actual question):
- a linear motion for time A, the object moves at constant speed
- no motion for time B, the object is stopped
- repeat at 1.
thanks!
© Stack Overflow or respective owner