Quote: "how do you apply that to an angle? "
When you rotate any object, you get the current angle of the axis you want to rotate about and add a value. Continue adding that value and the object will rotate.
If it's a fixed value, it will instantly rotate while the given key is pressed and instantly stop when the key is released. Using the method above, Speed# is used as the
amount to increment the object's angle and starts at 0.0.
When the Accell# variable is continuously added to it (ie when the key is pressed), the value of Speed# slowly increases and the object rotates a little bit more each time - until it reaches the required top speed (which would be capped at the required value).
What you see is rotation which slowly gathers speed. Slowing down is simply the reverse.
[Edit] Having re-read my last post I can see how it might have sounded a little confusing so I re-worded it to make it more understandable.
Quote: "and how would that make it move?"
It wouldn't make it move - I was just explaining the principle of the acceleration (rolling) side of things. You would have to apply the same method to the movement too.
Sync On: Sync Rate 0
AutoCam Off
CLS: Sync
Ink RGB(255,0,0),0: Box 0,0,255,255
Ink RGB(0,255,0),0
For N=1 To 16 Step 2
Box N*16,0,N*16+16,256
Next N
Get Image 1,0,0,256,256,1
Make Object Sphere 1,1
Texture Object 1,1
Position Camera 0,2,-2
Point Camera 0,0,0
Speed# = 0.0: Rem Starting Speed
Accell# = 0.001: Rem Acceleration Rate
Do
If UpKey() = 1
Inc Speed#,Accell#
If Speed# > 2.0 Then Speed# = 2.0
Else
If Speed# > 0.0 Then Dec Speed#,Accell#
If Speed# < 0.0 Then Speed# = 0.0
Endif
XRotate Object 1,WrapValue(Object Angle X(1) + Speed#)
Sync
Text 0,0,"Speed: "+Str$(Speed#)+" "
Loop
There's no reason why you couldn't also use the value of Speed# to move the ball if you wanted to.
TDK