Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (fairtrader, AndrewAMD, 3run), 576 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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 | chip programmers | 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