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 / GetSpritePhysicsCollison dose not always work

Author
Message
haliop
User Banned
Posted: 13th Oct 2014 23:48
have anyone encountered such a problem ?

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Oct 2014 00:37 Edited at: 14th Oct 2014 00:39
maybe the sprite jump over the other sprite in one step,
you need set as bullet.
or try SetPhysicsDebugOn once
or you had set the collision mask/bits wrong.
or spritegroup.
try print some infos at screen each frame.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini
haliop
User Banned
Posted: 14th Oct 2014 00:44
i\ll try the bullet thing cause it makes sense there are many sprites there

i dont using collision mask/bits or spritegroups.. so the only solution here is the bullet thing i will try it now , thank you.

haliop
User Banned
Posted: 14th Oct 2014 00:48
nope that dosent work i think GetSpritePhysicsCollision is bugged.
god damnit ! i hate it when AppGameKit is not reliable !

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Oct 2014 01:08
did u enabled SetPhysicsDebugOn ,
there you can see the shape.
if nothing help give us example code for testing.
2. I agree
3. 2d box physics is a open source project.

but the best joke i had see
in shiva engine (they used other open source physic engine)
my sphere for a ball game hang on polygon edges in a flat plane at low speed^^ arrrrgggg i had waste weeks with it...

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 14th Oct 2014 08:43
I haven't seen any problems with these commands. Example code will definitely help.
haliop
User Banned
Posted: 14th Oct 2014 09:19
when i put physicsdebug on it shows the collision between the 2 sprites but




k returns 0...
so..

haliop
User Banned
Posted: 14th Oct 2014 09:25 Edited at: 14th Oct 2014 09:28
sorry it was a bug in my code, thank you for your help tough.

edit: sorry i dose not work..

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 14th Oct 2014 10:37
Post some code and I'm sure I can help?
haliop
User Banned
Posted: 14th Oct 2014 10:42
i cant.. its too much code im getting to thinking again and again AppGameKit is not that good.

haliop
User Banned
Posted: 14th Oct 2014 10:48 Edited at: 14th Oct 2014 10:49


ok so in the first collision checking it works and the welingpoint is workig on the second it returns f1 = 0

any ideas?

haliop
User Banned
Posted: 14th Oct 2014 10:50 Edited at: 14th Oct 2014 10:51
the idea is to create a weldjoint on the exact collision x y checked ... but for some reason it just dosent work.

and obviously its just a part of the code.. the part that dosent work

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 14th Oct 2014 15:22
Well the first thing I notice is you have a number of errors such as three different versions of "SpriteProp" ("Spriteprop" and "SpritePRop"). These might not cause an error in the compiler but maybe causing other problems.

Can I suggest that you create a very simple code example? If it's a simple collision check then recreate the sprites and test them in a very basic example. You will then know whether it is a problem with collisions or a problem with your code. My guess is that you have a badly named item somewhere causing a problem. Try putting "#option_explicit" at the start of your code as this will force you to declare variables and highlight any badly named / undeclared variables. It might seem a bit much to start with but it will at least take the most common coding errors off the table.

Login to post a reply

Server time is: 2024-05-04 19:58:47
Your offset time is: 2024-05-04 19:58:47