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.

AppGameKit Classic Chat / detection of a collision between a physics object and the edge of the screen

Author
Message
samqweqwe
11
Years of Service
User Offline
Joined: 7th Apr 2013
Location:
Posted: 5th Sep 2013 22:15
hello, i would like my game to make a sound when the object ( ball ) hits the wall, currently i have


but the collision ( - the y velocity ) does not always work and the ball is left outside the screen. i would prefer to use

but i do not know how to detect it

i was thinking of doing this with the physics walls:


but i am not sure if it will work

any suggestions?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Sep 2013 22:22
Create static physics sprites at the screen edge?

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Sep 2013 22:47
Yes, switch the walls off and use static sprites as mobiius suggested.

"Everything should be made as simple as possible, but not simpler."
samqweqwe
11
Years of Service
User Offline
Joined: 7th Apr 2013
Location:
Posted: 6th Sep 2013 12:47
thanks

Login to post a reply

Server time is: 2024-05-09 18:00:26
Your offset time is: 2024-05-09 18:00:26