Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (qin), 7,490 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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