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.

Newcomers AppGameKit Corner / 3D cube problem

Author
Message
Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 25th Feb 2018 18:52 Edited at: 25th Feb 2018 19:35
I would like the green box to stop when it hits the yellow floor, but it goes through it.

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 25th Feb 2018 19:46 Edited at: 25th Feb 2018 19:47
Haven't done anything with 3D physics, but you should declare your plane as static body, so physics objects are able to interact with it

Quote: "Create3DPhysicsStaticBody(2)"


Dunno if there is a better / easier solution, though


PSY LABS Games
Coders don't die, they just gosub without return
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 28th Feb 2018 17:32
PSY is right in how you need to create a 3D physics body for your plane for it to stop other physics objects. I would recommend using a Box for the ground surface, not a Plane shape. I don't know why exactly, but physics collision detection has been more reliable with a Box.

Login to post a reply

Server time is: 2024-03-28 23:51:57
Your offset time is: 2024-03-28 23:51:57