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 Studio Chat / [SOLVED] SetObject3DPhysicsGroupAndMask() - help request

Author
Message
CatfoodMcFly
9
Years of Service
User Offline
Joined: 24th Jan 2015
Location: Stoke-on-Trent
Posted: 15th Dec 2023 13:40 Edited at: 15th Dec 2023 13:40
I've got a scene, made entirely of static physics objects. I've put in a function to create an explosion that scatters debris. I need the debris objects to collide with everything else, but not each other.
I know I must need to use SetObject3DPhysicsGroupAndMask() to achieve this, but I can't quite figure out how it works - if I attempt to use it, the debris won't collide with anything at all, and falls through the static plane on the ground.
The help on the AppGameKit site doesn't give any real detail... can anyone clue me in?

Thanks in advance!

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Dec 2023 22:29 Edited at: 15th Dec 2023 22:29
This project (Posted by another member of the forum) uses SetObject3DPhysicsGroupAndMask. Maybe that will help

Attachments

Login to view attachments
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 16th Dec 2023 22:40
This post has been marked by the post author as the answer.
Hi CatfoodMcFly, I had a play with explosion forces and limited collisions.
Hope it helps.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Attachments

Login to view attachments
CatfoodMcFly
9
Years of Service
User Offline
Joined: 24th Jan 2015
Location: Stoke-on-Trent
Posted: 17th Dec 2023 12:26
Thanks guys! I have it figured out now. Where I seemed to be going wrong was the basic understanding of how it worked, i.e. that a mask would be a group the object would collide with - from the wording, I imagined a masked group would be masked from collisions. It appears to mean the opposite!

Login to post a reply

Server time is: 2024-05-03 00:22:09
Your offset time is: 2024-05-03 00:22:09