Might have fixed PhysX triangle meshes
This commit is contained in:
@@ -346,12 +346,11 @@ create_physx_actor :: (e: *Entity) {
|
|||||||
matrix := inv_matrix * render_data.transform.world_matrix;
|
matrix := inv_matrix * render_data.transform.world_matrix;
|
||||||
|
|
||||||
if node.meshes.count > 0 {
|
if node.meshes.count > 0 {
|
||||||
print("NUM MESHES %\n", node.meshes.count);
|
|
||||||
for m, mi: node.meshes {
|
for m, mi: node.meshes {
|
||||||
index_start : u32 = xx indices.count;
|
index_start : u32 = xx indices.count;
|
||||||
mesh := parray_get(*engine.renderer.meshes, m);
|
mesh := parray_get(*engine.renderer.meshes, m);
|
||||||
for v: mesh.positions {
|
for v: mesh.positions {
|
||||||
array_add(*points, v);//transform_position(v, matrix));
|
array_add(*points, transform_position(v, matrix));
|
||||||
}
|
}
|
||||||
|
|
||||||
for i: mesh.indices {
|
for i: mesh.indices {
|
||||||
@@ -390,8 +389,8 @@ create_physx_actor :: (e: *Entity) {
|
|||||||
filter_data.word2 = 1;
|
filter_data.word2 = 1;
|
||||||
filter_data.word3 = 1;
|
filter_data.word3 = 1;
|
||||||
|
|
||||||
//PhysX.PxShape_setSimulationFilterData(shape, *filter_data);
|
PhysX.PxShape_setSimulationFilterData(shape, *filter_data);
|
||||||
//PhysX.PxShape_setQueryFilterData(shape, *filter_data);
|
PhysX.PxShape_setQueryFilterData(shape, *filter_data);
|
||||||
|
|
||||||
PhysX.PxRigidActor_attachShape(actor, shape);
|
PhysX.PxRigidActor_attachShape(actor, shape);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user