[Bf-blender-cvs] [4cfae04] hair_system: Properly initialize the root goal tangent when doing a simulation step.

Lukas Tönne noreply at git.blender.org
Mon Aug 18 12:08:33 CEST 2014


Commit: 4cfae04ca0c5c223983fce81745dfae868eecd70
Author: Lukas Tönne
Date:   Mon Aug 18 08:47:20 2014 +0200
Branches: hair_system
https://developer.blender.org/rB4cfae04ca0c5c223983fce81745dfae868eecd70

Properly initialize the root goal tangent when doing a simulation step.

===================================================================

M	source/blender/hair/intern/HAIR_scene.cpp

===================================================================

diff --git a/source/blender/hair/intern/HAIR_scene.cpp b/source/blender/hair/intern/HAIR_scene.cpp
index ebe8135..1b394a2 100644
--- a/source/blender/hair/intern/HAIR_scene.cpp
+++ b/source/blender/hair/intern/HAIR_scene.cpp
@@ -131,6 +131,7 @@ void SceneConverter::update_solver_data_externals(SolverData *data, SolverForces
 		
 		curve->root0 = curve->root1;
 		mesh_sample_eval(dm, mat, &hcurve->root, curve->root1.co, curve->root1.nor);
+		normalize_v3_v3(curve->root1.tan, float3(0,0,1) - dot_v3v3(float3(0,0,1), curve->root1.nor) * curve->root1.nor);
 	}
 	
 	forces.dynamics_world = scene->rigidbody_world ? (rbDynamicsWorld *)scene->rigidbody_world->physics_world : NULL;




More information about the Bf-blender-cvs mailing list