Game Development Community

Why physicsShape into PhysicsDebrisData can't work in T3d1.2

by Szzg007 · in Torque 3D Professional · 12/06/2011 (8:39 pm) · 6 replies

I has copy "/Torque 3D Pro 1.1/Demos/Pacific" physicsShape files to T3d1.2
detail:
copy "/Pacific/game/art/shapes/physicsShapes" all files toT3d1.2demo/game/art/shapes/physicsShapes", and 2 files ("/Pacific/game/art/datablocks"physicsShape.cs" and "/Pacific/game/scripts/server" physicsShape.cs )

and add exec("./physicsShape.cs"); to "/game/art/datablocks/datablockExec.cs"
and add exec("./physicsShape.cs"); to "game/scripts/server/scriptExec.cs"

but can't work.....

so why?

Who can help me?

that files can't shiver...

#1
12/07/2011 (3:37 am)
Why physicsShape can't work in T3d1.2
some body can talk me?
#2
12/07/2011 (9:42 am)
Just copying those files isn't going to do anything for you unless you also:
1) Create a project using one of the "PhysX" templates,
2) Copy the art assets for the physics objects from Pacific into your new project. You should be able to just copy the /art/shapes/physicsShapes/ folder to your new project.

If you want a simple test of the physics objects that will work with the PhysX Full template, create a .cs file in /art/datablocks/ (and exec it in datablockExec.cs) with just this in it:

datablock PhysicsShapeData( PSBoulder )
{	
   invulnerable = 0;
   
   category = "PhysicsShape";
	
   shapeName = "art/shapes/rocks/boulder.dts";
   mass = "10";
   friction = "1";
   staticFriction = "0.1";
   buoyancyDensity = "0.1";
};

These boulders don't roll very well due to their low-poly collision meshes, but it'll at least tell you if the physics stuff is all working.
#3
12/07/2011 (5:02 pm)
I think my question no description is clear.

I find I have quoted PSRedBarre this object.

But, after I shot it, PhysicsShapeData not into PhysicsDebrisData
#4
12/08/2011 (12:13 pm)
Sorry, apparently I didn't really read the topic. I'm guessing you're getting a console error indicating that PhysicsShape doesn't have a damage function.

I don't have access to the scripts from here, but I'm pretty sure the missing piece is the GameBase::damage function from Pacific's scripts/server/shapeBase.cs ... Should be able to just copy that function over to your project's shapeBase.cs.

Hopefully that'll do it... I can't test it from here.
#5
12/08/2011 (5:18 pm)
OK. Thanks Henry Todd..
I to try now....

maybe is that...
#6
12/08/2011 (5:39 pm)
OKOK.that is good...
@ Henry Todd..
Thanks very much....