Jump to content

[SOLVED] BodyFracture and Joint problem


photo

Recommended Posts

Hello!
I need create fracturing "target". I create cylinder from source code and rotating it (see attaching picture). If player collide with "target" from the bottom, camera is failed (black screen). After command "editor_load" camera don't work too. What I doing wrong?

Link to comment

Attached picture seems to be missing. Best approach for problem resolution is to provide a small test case for problem reproduction. Based on the very short description most probably it will be hard to provide any usefull hints.

Link to comment

First problem solved, but appeared second. Need remove joint and break BodyFracture at the same time.

I can't remove joint in ContactCallback whith BodyFracture (which joint to BodyDummy). In random iterations it's work, as well as createCrackPieces. Source code in attach. Thanks in advance!

test_fracture.rar

Link to comment

your mistake material name.

 

 

skinner_agent_body_d ->skinner_agent_body

skinner_agent_head_d ->skinner_agent_head

skinner_agent_eye_d ->skinner_agent_eye

 

 

test_fracture.mat

//

 

<?xml version="1.0" encoding="utf-8"?>

<materials version="1.10">

<material name="skinner_agent_body_d" parent="mesh_base">

<state name="emission">1</state>

<texture name="diffuse">textures/agent_body_d.dds</texture>

<texture name="normal">textures/agent_body_n.dds</texture>

<texture name="specular">textures/agent_body_s.dds</texture>

<texture name="emission">textures/agent_body_e.dds</texture>

<parameter name="base_transform">vec4(2.0f,1.0f,0.0f,0.0f)</parameter>

<parameter name="specular_scale">5</parameter>

<parameter name="fresnel_bias">0.1</parameter>

<parameter name="fresnel_power">2</parameter>

</material>

<material name="skinner_agent_head_d" parent="mesh_base">

<texture name="diffuse">textures/agent_head_d.dds</texture>

<texture name="normal">textures/agent_head_n.dds</texture>

<texture name="specular">textures/agent_head_s.dds</texture>

<parameter name="specular_scale">2.763</parameter>

<parameter name="fresnel_bias">0</parameter>

<parameter name="fresnel_power">2</parameter>

</material>

<material name="skinner_agent_eye_d" parent="mesh_base">

<texture name="diffuse">textures/agent_head_d.dds</texture>

<texture name="normal">textures/agent_head_n.dds</texture>

<texture name="specular">textures/agent_head_s.dds</texture>

<parameter name="specular_scale">2.763</parameter>

<parameter name="fresnel_bias">0</parameter>

<parameter name="fresnel_power">2</parameter>

</material>

<material name="green" parent="mesh_base">

<texture name="diffuse">textures/green_d.dds</texture>

</material>

<material name="red" parent="mesh_base">

<texture name="diffuse">textures/red_d.dds</texture>

</material>

</materials>

//

Link to comment
×
×
  • Create New...