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 / show collision outline

Author
Message
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 2nd Dec 2023 09:02
how do you show collision shape outline in agk?

Any help appreciated!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Dec 2023 15:06 Edited at: 2nd Dec 2023 15:07
SetPhysicsDebugOn() will show the collision shape(s) but i believe you have to use a SetSpriteShape command or SetSpritePhysicsOn()
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 3rd Dec 2023 04:07 Edited at: 3rd Dec 2023 04:08
Thank you!

Can't find this command for the life of me!

I'm like, no way there would not be such command, how do you do collision shape blind?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 3rd Dec 2023 04:22
Quote: " how do you do collision shape blind?"

that's part of why i dont do 3D so much.

meanwhile, there's some overlap in the 2d physics and sprite commands that you mighta noticed now

and, some like to mix 2d physics and 3d
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Dec 2023 22:10
Unfortunately there is no function to show the collision shape
What I did in this thread was "sprinkle" cubes over an object so i could see the collision shape
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 4th Dec 2023 03:38 Edited at: 4th Dec 2023 03:52
isn't the 3d shape itself a collision shape?

or can it be define separately?

Or do you mean a mesh view like in other game engine?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Dec 2023 06:33 Edited at: 4th Dec 2023 07:23
i guess i'm not sure whether ur talking 2d or 3 but, either way, you can add/define shape(s)
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 5th Dec 2023 22:53
For 3D SetObjectShapeStaticPolygon() will help if you have static objects. By default if you bring in an object it will be a square box around the shape.

But dynamic objects are a different beast. For example if you made a cool container thing in Blender and you want it to be dynamic and move around and then put other cool 3d dynamic object thingys inside it, you will be disappointed to see that an invisible lid has been placed by AppGameKit and all the thingys fall off to the side.

SetObjectShapeCompound() is your answer to create invisible boundaries to represent where you want the real boundaries to be. When you call the command it will wipe the existing object shape and you replace it with pieces like AddObjectShapeBox() or AddObjectShapeSphere(). Note that the documentation is WRONG when it refers to world coordinates for positioning the compound shapes, the coordinates are based on the object itself.
Automation on Steam now!
Score Table Jr. on Google Play!

Login to post a reply

Server time is: 2024-05-02 15:45:23
Your offset time is: 2024-05-02 15:45:23