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 / Over riding 2D physics collisions

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Jul 2019 01:29
I have a situation where two objects will collide. In one instance i want one to bounce off the other, in another instance i want the other object to explode into bits.
These reactions will be dynamic and will depend on the state of both objects.
What would be the best way to implement this using 2D physics?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Jul 2019 04:43
haven't done allot with 2d physics apart from applying gravity but
I have a shatter sprite routine that might work for your explosion
https://forum.thegamecreators.com/thread/222027?page=3
similar to the way 3D ones work without being dynamic.physics objects
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Jul 2019 04:59 Edited at: 9th Jul 2019 05:00
Thanks. Something like that may work. I guess i could take the shape out of 2D physics when it needed to explode and do it manually
Here's what i want to do




You flick the large ball and as it hits the smaller balls it grows larger.
If it hits a wall and the diameter of the ball is larger than the length of the wall than the wall will explode and the ball will continue along it's way
If it hits a wall and the diameter of the ball is less than the length of the wall it will bounce off
Kind of a puzzle game

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Jul 2019 05:21
this is the shooting function from blitzkrieg remake from classic games thread
i beleive setting sprite physics bullet like this it should bounce off other physics objects but havent tested


fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Jul 2019 05:29
Awesome. I will give it a go
rocklee
5
Years of Service
User Offline
Joined: 10th Apr 2019
Location:
Posted: 9th Jul 2019 05:35
how i can download your project?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Jul 2019 09:41
I don't have a project as yet. If you tell me what your looking for, maybe i can help?

Login to post a reply

Server time is: 2024-11-22 21:47:11
Your offset time is: 2024-11-22 21:47:11