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.

Dark Physics & Dark A.I. & Dark Dynamix / must have been saved with phy make rigid body dynamic convex ..how?

Author
Message
Slaid
18
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Vallsjobo, Sweden
Posted: 10th Nov 2007 08:55
I'm trying to cut down load time.

rem Here I load my object and make if a dynamic rigid body
load object "Models\MappedPIII_2.x",ob101
position object ob101,d#,e#,f#
phy make rigid body dynamic convex ob101,b rem b=material 201


from help file
file$

the data from file to be loaded, this must have been saved with phy make rigid body dynamic convex

What is the sytax used for saving? And what would I actualy be saving?

May the sun shine on the soles of your feet.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Nov 2007 19:55
It's exactly the same command, but with one more parameter at the end - a file name. It can be anything, for example "myConvexBody.msh".

Slaid
18
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Vallsjobo, Sweden
Posted: 11th Nov 2007 12:05
Do you mean that istead of this

load object "OriginalPIII_TL.x",ob101
position object ob101,d#,e#,f#
phy make rigid body dynamic convex ob101,b

I would use only this command...

phy make rigid body dynamic convex ob101,b,"OriginalPIII_TL.x"

And if that is what you mean, then how do I position the model. Because I know from trying that position object command dosen't work on physic objects. (Att least I never got it to work)

May the sun shine on the soles of your feet.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Nov 2007 13:04
Firstly, you would make/load your standard object. Then you would:

phy make rigid body dynamic convex

with the extra file parameter. This will export the data required to make the rigid body to a file. You'd probably do this in a separate, simple project designed to just make the physics data files.

Then, in your game, you would load your standard object. To make it into a physics Rigid body, use:

phy load rigid body dynamic convex

To move physics bodies' positions without forces, use phy set rigid body position and phy set rigid body rotation

Slaid
18
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Vallsjobo, Sweden
Posted: 11th Nov 2007 14:45
But the question is EXPORT to where,

phy make rigid body dynamic convex ob101,"OriginalPIII_physic.x",b
(phy make rigid body dynamic convex ID, file$, material)

It dosn't produce any file I can find. I've tried .x, .dbo, .txt

The only thing it dose is cause the following line to fail, and I loss all controll over the object.

phy make rigid body dynamic convex ob101,b

I'm just leaving it for now. Everything works fine without it.
phy set rigid body position and phy set rigid body rotation
Now how could I have overlooked those commands!

Thanks for the help.

May the sun shine on the soles of your feet.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Nov 2007 16:54
You can export anywhere, you just need to remember where you saved it.

The other important point is that when you run this command with the file, it still creates the rigid body. So it works in two modes, and you need to differentiate between the two ways of using it. That's why I suggested having a separate application for generating the data files.

Slaid
18
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Vallsjobo, Sweden
Posted: 14th Nov 2007 14:18
Dark Physics Techniques is where to look

Now I understand...

phy make rigid body dynamic convex object num,"Name.mesh"

the file Name.mesh gets saved, no ploblem now.

May the sun shine on the soles of your feet.

Login to post a reply

Server time is: 2024-05-08 20:45:15
Your offset time is: 2024-05-08 20:45:15