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 / Delete3DPhysicsBody

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 20th Mar 2017 16:06 Edited at: 20th Mar 2017 16:08
Trawled about, but not a lot of info for 3D physics on here (nice posts by Stab In the Dark though).

Just wanted to check that when using the above command, any shape on the 3D object is automatically deleted as well?

[edit] oops.. please move this most to the "Product Chat"
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: 21st Mar 2017 14:28
Yes, Delete3DPhysicsBody() deletes the collision shape as well.
The coffee is lovely dark and deep,and I have code to write before I sleep.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 21st Mar 2017 23:13
Thanks. Glad to see you are still active on here. I've got quite a few questions stacking up which I need to assemble regarding some of the commands lack of info.
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: 22nd Mar 2017 02:24
Quote: "Glad to see you are still active on here."


Seems no one is allowed to leave unless you get banned.
The coffee is lovely dark and deep,and I have code to write before I sleep.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Mar 2017 11:23
Hah!

Well, I picture this scenario where a handful of people are struggling along and experimenting with the 3D physics for instance, yet not posting questions or findings which will either help or encourage others to expand AGK's portfolio of content.
I expect people will keep such hard won knowledge to themselves and there's no real insight into how many people are using a particular feature.

I don't disagree with a post I read regarding 95% of the users of AppGameKit not using it to it's full potential, but is that perhaps down to how approachable some of it is due to poor documentation?

I solved one of my problems anyway, which was why convex hull objects didn't behave properly in the physics sim - bit of a forehead slap, as I had the object's origin not at the centre of mass (have to remember that one!)
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: 22nd Mar 2017 15:41
The objects center of mass needs to be centered around origin in your modeling program before export.
Then in AppGameKit that is where it will be for the physics body. I actually developed an automatic method to create
a compound object out of convex hulls for objects with concavity. Also the ability to move the center of mass
for compound objects. The game creators did not include this in the 3D physics, so sadly it is not available to
the AppGameKit users. This video shows what is possible but not available in AGK.







The coffee is lovely dark and deep,and I have code to write before I sleep.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Mar 2017 22:17
You say around origin, but on an irregular shape, you need to work out the centre of mass, not just the origin.
e.g. a fishing rod with a massive fish on it is going to be centred on the fish if it is heavier than the rod etc.

How do you visualise the collision shapes? Is that tool not written in AppGameKit then? The ability to visualise the collision shapes is kind of essential to do anything serious or it's fumbling about somewhat.

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Mar 2017 22:32
Watching the rest of the video (and putting my headphones on!) I can see it's made with AGK.

Also, you cover the centre of mass point

So, at least I can load the BCS files even though I can't create or see them in AppGameKit?

This app btw, is excellent.
I'm guessing then, that you are generating shapes (thus BCS files) which even though aren't natively supported, at least can be used in AppGameKit?




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: 23rd Mar 2017 00:35
Yes this app was made using Tier2 C++ AGK. When I added Bullet Physics to AppGameKit for the game creators
I added the Bullet Physics debug mode to AGK. This will draw a wireframe for all the collision shapes
and joints. The problem was that Paul had not setup AppGameKit to draw wireframe so it could not show the debug mode.
You can see what the wireframe debug mode looks like by looking at one of my Bullet physics videos for DBPro.
The code is there in AppGameKit for debug mode Paul just needs to enable wireframe. In the app above I needed to visualize the
collision shapes so I get the collision shape data and create AppGameKit objects to represent them. I just hide them when not needed.
The Bullet collision shape is actually a point cloud that needs to be converted to triangles to be able to create objects from it.
Since in Tier2 I have full access this is relatively easy to do. Also this app is using a modified version of the Bullet physics code
to allow for the center of mass to be offset from the objects center. AppGameKit currently only allows the center of mass to be the center
of the object as set by your modeling program. It is possible in AppGameKit tier1 to calculate the volume of a convex hull and calculate the center of mass
and then move all the vertices of the object so they are centered about the calculated center of mass but would not be practical in Tier1.
If you look at my other videos of the Fracture physics this is exactly what I do when I create the new fractured pieces.
Most modeling programs will calculate center of mass and center the object before export. I am pretty sure Blender and Fragmotion can.

The coffee is lovely dark and deep,and I have code to write before I sleep.
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: 23rd Mar 2017 13:38
Rick just announced that AppGameKit Tier1 will be able to use DLLs soon. This will allow me to add all these physics features to AppGameKit Tier1.
The coffee is lovely dark and deep,and I have code to write before I sleep.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 23rd Mar 2017 15:41
DLLs? That would be excellent. Just what AppGameKit needs.

Login to post a reply

Server time is: 2024-11-24 18:52:33
Your offset time is: 2024-11-24 18:52:33