Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/rigidbody.c
| Show First 20 Lines • Show All 1,714 Lines • ▼ Show 20 Lines | static void rigidbody_update_sim_ob( | ||||
| /* only dynamic bodies need effector update */ | /* only dynamic bodies need effector update */ | ||||
| else if (rbo->type == RBO_TYPE_ACTIVE && | else if (rbo->type == RBO_TYPE_ACTIVE && | ||||
| ((ob->pd == NULL) || (ob->pd->forcefield == PFIELD_NULL))) { | ((ob->pd == NULL) || (ob->pd->forcefield == PFIELD_NULL))) { | ||||
| EffectorWeights *effector_weights = rbw->effector_weights; | EffectorWeights *effector_weights = rbw->effector_weights; | ||||
| EffectedPoint epoint; | EffectedPoint epoint; | ||||
| ListBase *effectors; | ListBase *effectors; | ||||
| /* get effectors present in the group specified by effector_weights */ | /* get effectors present in the group specified by effector_weights */ | ||||
| effectors = BKE_effectors_create(depsgraph, ob, NULL, effector_weights); | effectors = BKE_effectors_create(depsgraph, ob, NULL, effector_weights, false); | ||||
| if (effectors) { | if (effectors) { | ||||
| float eff_force[3] = {0.0f, 0.0f, 0.0f}; | float eff_force[3] = {0.0f, 0.0f, 0.0f}; | ||||
| float eff_loc[3], eff_vel[3]; | float eff_loc[3], eff_vel[3]; | ||||
| /* create dummy 'point' which represents last known position of object as result of sim */ | /* create dummy 'point' which represents last known position of object as result of sim */ | ||||
| /* XXX: this can create some inaccuracies with sim position, | /* XXX: this can create some inaccuracies with sim position, | ||||
| * but is probably better than using un-simulated values? */ | * but is probably better than using un-simulated values? */ | ||||
| RB_body_get_position(rbo->shared->physics_object, eff_loc); | RB_body_get_position(rbo->shared->physics_object, eff_loc); | ||||
| ▲ Show 20 Lines • Show All 663 Lines • Show Last 20 Lines | |||||