I have a problem. When I fire a cannon, the cannon ball moves toward the target but passes through it without colliding with it because it is move too fast. How do I fix this without making the cannon ball move too slow? This is the code to my cannon fireing subroutine. Sorry it is so messy with commads that don't do anything but I am in a hurry.
shot:
make object sphere a,2
`position object a,object position x(1)+5,object position y(1)+3,object position z(1)
position object a,x,y,z
point object a,x2,y2-rnd(50),z2+rnd(10)
texture object a,7
repeat
`for i=1 to 50
move object a,5
sync
`next i
until object hit(a,2)=1 or object position x(a)=object position x(2)-10
hide object a
Make Object Sphere b,20
texture object b,5
ghost object on b
`Hide Object 4
scale object b,.1,.1,.1
Make Object Sphere c,20
texture object c,5
ghost object on c
`Hide Object 5
scale object c,.1,.1,.1
position object b,object position x(a),object position y(a),object position z(a)
position object c,object position x(a),object position y(a),object position z(a)
a#=2
b#=2
`show object 4
`show object 5
sync
for i=1 to 40
if i>=5
scale object 4,a#,a#,a#
scale object 5,b#,b#,b#
b#=b#+12
else
scale object 4,a#,a#,a#
endif
sync
a#=a#+12
next i
hide object b: hide object c
return