Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / A problem with ball movement

Author
Message
Timmeh
18
Years of Service
User Offline
Joined: 15th Nov 2005
Location: Somewhere... I think...
Posted: 16th Nov 2005 03:05
I just finished making my first game (pong using this tuthttp://forum.thegamecreators.com/?m=forum_view&t=22030&b=7)
and am now trying to make a break-out game. I need the ball to bounce off the top of the stage. I am doing this by checking if the z coordinants are more than 15. Here is my code:

What is wrong? I have the angle wraping and the z detection right (I think...) Thank you,
Tim

Timothy Sassone
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Nov 2005 14:40
360 degrees is a full rotation - eg; back to your starting angle!

Try this instead:

if ballz#>=15 then balla#=180-balla#

TDK_Man

Timmeh
18
Years of Service
User Offline
Joined: 15th Nov 2005
Location: Somewhere... I think...
Posted: 16th Nov 2005 14:50
*smacks head* thanks! can't belive I missed that though... even if I haven't been using DB for a week yet...

Timothy Sassone

Login to post a reply

Server time is: 2024-09-24 09:33:12
Your offset time is: 2024-09-24 09:33:12