right, well, I have no problem making the ball face in the same direction as player, just making it move that way is hard for me to figure out. see here for yourself
ballThrown = 1
REM when mouse is clicked, the current ball position and angle is placed in temporary variables
bpx# = Newxvalue(opx#,oay#-300,6)
bpy# = opy#+21
bpz# = Newzvalue(opz#,oay#-300,6)
bax# = oax#
bay# = oay#
baz# = oaz#
btpy# = (7+addVel)*sin(camera angle x()*-1) <<=== math for Y position
btpx# = (7+addVel)*cos(camera angle x()*-1) <<=== math for X position
endif
endif
addVel = 0
if ballThrown = 1
if bpx# < 700 and bpx# > -700
if sin(camera angle y()) < 0.0 then bpx# = bpx# - btpx# <<== increase or decrease X position depending on which way the player is facing
if sin(camera angle y()) >= 0.0 then bpx# = bpx# + btpx#
endif
bpy# = bpy# + btpy# <<=== increase Y
position object 222, bpx#, bpy#, bpz# <<== position ball
btpy# = btpy# - 0.1 <<== apply the gravity
endif
see, this is probably all wrong wrong wrong, but I'm new to 3d physics, so it's like... i want to cry and stuff
So please help me out if you got the time
***********************************************
Me, i'll just be here crying my brains out