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 / Having problems with 3D physics collisions

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd May 2018 11:19
I came across baxslash's 2D to 3D demo and I thought that would be great to play around with

so I create a plain and 4 box sides and several balls im trying to get the balls to bounce off the walls



The balls move with the arrow keys which I plan later to set just with the gyro Set3DPhysicsGravity(GetDirectionX(),GetDirectionY(),0)
instead of how I got it to test under windows. At the moment the balls move and the collisions seem to work with each other but not
the static objects on the side. Which i want to use as boundaries to keep them in place i may later add a top invisible plane to keep the
balls from escaping and i may do something fance with the plane thats currently theer ATM


Thanks in Advance for any help
fubar
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 24th May 2018 02:33
List of mistakes.
1.You can not create a physics static body for an object plane.
2.You can not fix object to object after it is a physics object.
3.You can not move Static physics objects.
4.You can not mix 2D and 3D physics.
The coffee is lovely dark and deep,and I have code to write before I sleep.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 24th May 2018 03:51
Thanks Stab in the dark software
Quote: "
1.You can not create a physics static body for an object plane.
2.You can not fix object to object after it is a physics object.
"

Had no idea of that thought it was the way I was using collisions
Quote: "
4.You can not mix 2D and 3D physics.
"

I didnt think so but i had the code working how i wanted with, in 2D and i thought ide set myself the task of making it 3D
so there was still some old uneeded code there, i still might use the rendering bit yet

unfixing the objects and repositions did the trick and making the box a 3dbox and not a plane
I really searched forums and helpfile but never learned that till now
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 24th May 2018 08:24
@Stab
Quote: "2.You can not fix object to object after it is a physics object."


Didn't know about that.
So that would mean the normal approach of the player picking up a weapon when he finds it and attaching it to his/her hand wouldn't work?

Is there an alternative workflow for that?
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 24th May 2018 09:53
Would deleting the object and then recreating it for holding in hand work as a bandaid?
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 24th May 2018 12:02
Thought about that. So every time delete and recreate the physics object if the character picks up something, but I wonder if that would be noticeable.
Hmm have to try when get to it.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 25th May 2018 21:07
Quote: "So that would mean the normal approach of the player picking up a weapon when he finds it and attaching it to his/her hand wouldn't work?

Is there an alternative workflow for that?"


The Players bone animated model would never be a physics object.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 25th May 2018 22:23
Ah ok so FixObjectToBone() would work then if I understand correctly.
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 26th May 2018 09:32 Edited at: 26th May 2018 09:33
Hi, picking up physic objects is also being discussed in this thread: No VR forum Section?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th May 2018 23:32
This is what I was kinda trying to do still needs work


Things to do
1.The rendering is only doubling the ball count atm I was hoping for a nice blur effect
2.The Gyroscope needs work as that was set it up like that for testing under windows
fubar

Login to post a reply

Server time is: 2024-11-18 12:24:40
Your offset time is: 2024-11-18 12:24:40