Physics How To
Blitz3D Forums/Blitz3D Userlibs/Physics How To| 
 | ||
| so how would someone go about making a physics engine? | 
| 
 | ||
| Graphics 512,512,0,2 SetBuffer BackBuffer() xp#=100 yp#=100 xg#=0 yg#=0 While Not KeyHit(1) mx=MouseX() my=MouseY() ;Richtungsvektor an Geschwindigkeit anlegen xg=xg+(mx-xp)/100.0 yg=yg+(my-yp)/100.0 ;Ein einfacher Luftwiederstandersatz xg=xg*.98 yg=yg*.98 ;Geschwindigkeit an Position anwenden xp=xp+xg yp=yp+yg Color 255,0,0:Line mx,my,xp,yp Color 255,255,0:Oval xp-4,yp-4,9,9,1 Color 255,255,255:Rect mx-4,my-4,9,9,0 Flip Cls Wend End Just a beginning ;) | 
| 
 | ||
| coolio... | 
| 
 | ||
| hey, just made it so the ball bounces off the walls | 
| 
 | ||
| Cool, here another one. First draw some lines with the left mouse button, then push 2 times ESC. (i have lots of this little codes that i found all the time in the forums ^^) | 
| 
 | ||
| cool, thanx | 
| 
 | ||
| heres a great physics example i found  here |