So, the first main issue is that the tilt_modifier seems to be vec3 and needs to be float (Or, somehow the setting for the parameter has been set wrong…) There have been quite a few changes to movement.
These are the "only" errors I'm getting at this moment: I also noticed that the way the head movement works has been updated, which broke a portion of that while flying. These are the portions that changed:
Code: Select all
Broke Head Look in Air
a209:
eye_look_target = this_mo.position + camera.GetFacing() * 100.0f;
} else {
if(look_target.type == _none){
eye_look_target = random_look_target;
} else if(look_target.type == _character){
vec3 target_pos = ReadCharacterID(look_target.id).rigged_object().GetAvgIKChainPos("head");
eye_look_target = target_pos;
}
}
}
a207:
dir_flat.y = 0.0f;
target_head_dir = mix(dir_flat, normalize(dir_flat), 0.5f);
target_head_dir.y = camera.GetFacing().y * 0.4f;
if(!on_ground){
target_head_dir = mix(target_head_dir, this_mo.GetFacing(), 0.5f);
}
target_head_dir = normalize(target_head_dir);
look_inertia = 0.8f;
} else {
if(look_target.type == _none){
target_head_dir = random_look_dir;
} else if(look_target.type == _character){
vec3 target_pos = ReadCharacterID(look_target.id).rigged_object().GetAvgIKChainPos("head");
target_head_dir = normalize(target_pos - this_mo.rigged_object().GetAvgIKChainPos("head"));
}
look_inertia = 0.9f;
}
}
flying_mod:
dir_flat.y = 0.0f;
target_head_dir = mix(dir_flat, normalize(dir_flat), 0.5f);
target_head_dir.y = camera.GetFacing().y * 0.4f;
//FLYING MOD - disable head looking away from camera in air
/*
if(!on_ground){
target_head_dir = mix(target_head_dir, this_mo.GetFacing(), 0.5f);
}
*/
target_head_dir = normalize(target_head_dir);
look_inertia = 0.8f;
} else {
if(look_target.type == _none){
target_head_dir = random_look_dir;
} else if(look_target.type == _character){
vec3 target_pos = ReadCharacterID(look_target.id).rigged_object().GetAvgIKChainPos("head");
target_head_dir = normalize(target_pos - this_mo.rigged_object().GetAvgIKChainPos("head"));
}
look_inertia = 0.9f;
}
}
If anyone is brave enough to try and resolve these last remaining issues, we might be able to get this working again…