Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 14,136 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bounce for panels #272733
06/19/09 12:55
06/19/09 12:55
Joined: Jun 2009
Posts: 17
Russia, Murmansk
Lost_In_Space Offline OP
Newbie
Lost_In_Space  Offline OP
Newbie

Joined: Jun 2009
Posts: 17
Russia, Murmansk
Hey guys, there was such problem:
It is necessary to realise bouncing at collision of two panels. Help please?

Algorithm:
We take a corner under which ball has faced a wall, we add it to a corner of a normal and we direct a ball aside bouncing.

The scheme:
red line - norman direction
green line - ball direction for move
violet line - bouncing and next move direction




P.S. Please sorry for my bad english =)

Last edited by Lost_In_Space; 06/19/09 12:58.
Re: Bounce for panels [Re: Lost_In_Space] #272734
06/19/09 13:01
06/19/09 13:01
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
getting a normal on pixels is really tough (when using alpha channels).
if you just use walls like in your image, you can invert the x-axis movement (in the example image), that'll make it go the other way...

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Bounce for panels [Re: Helghast] #272735
06/19/09 13:09
06/19/09 13:09
Joined: Jun 2009
Posts: 17
Russia, Murmansk
Lost_In_Space Offline OP
Newbie
Lost_In_Space  Offline OP
Newbie

Joined: Jun 2009
Posts: 17
Russia, Murmansk
I do not use an alpha channel for check of collisions, I check only on image dimensions.

Last edited by Lost_In_Space; 06/19/09 13:09.
Re: Bounce for panels [Re: Lost_In_Space] #272741
06/19/09 14:32
06/19/09 14:32
Joined: Jun 2009
Posts: 17
Russia, Murmansk
Lost_In_Space Offline OP
Newbie
Lost_In_Space  Offline OP
Newbie

Joined: Jun 2009
Posts: 17
Russia, Murmansk
There are still ideas?

Re: Bounce for panels [Re: Lost_In_Space] #272760
06/19/09 16:55
06/19/09 16:55
Joined: Jun 2009
Posts: 17
Russia, Murmansk
Lost_In_Space Offline OP
Newbie
Lost_In_Space  Offline OP
Newbie

Joined: Jun 2009
Posts: 17
Russia, Murmansk
I have made all thanks for the help that wanted.

Last edited by Lost_In_Space; 06/19/09 16:55.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1