TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jamie Wyatt
NA
14
10.4k
Brickbreaker ball/paddle bounce issues
Apr 29 2011 9:01 PM
Evening all,
Having a few issues finishing my brickbreaker university project. As it stands the game will start and run, all of the bricks are happy to be hit by the ball, killed by the ball and have the ball bounce off. However, I've tried to use the same code (if (ballRectangle.Intersects(batRectangle)) to get the ball to bounce off the paddle but it's not having any of it.
I've attached the source code, there is also currently a save method in there that I can't get to work (see my other thread -
http://www.c-sharpcorner.com/Forums/Thread/120430/saving-an-int-to-a-txt-file.aspx
) but it's commented out so it shouldn't cause any compilation issues.
Any help you could offer would be great.
Cheers,
J.
EDIT : Slight update on this, it seems if the ball hits the area that the paddle starts off (dead centre) the ball will bounce as if the paddle is there, regardless of it's actual position.
Does this mean I'm moving the texture but not the rectangle? Is that possible?
Attachment:
breakout.rar
Reply
Answers (
8
)
need help with Knight's tour game in c# xna
Is there a limit in drawn objects?