Merge branch 'animtweaks' into 'master'

small anim tweaks

See merge request veloren/veloren!2039
This commit is contained in:
Joshua Barretto 2021-04-01 14:47:00 +00:00
commit 5918fbed74
3 changed files with 19 additions and 18 deletions

View File

@ -201,18 +201,18 @@ impl<'a> From<&'a Body> for SkeletonAttr {
Self {
scaler: match (body.species, body.body_type) {
// TODO : Derive scale from body proportions
(Orc, Male) => 1.14,
(Orc, Female) => 1.02,
(Human, Male) => 1.02,
(Human, Female) => 0.96,
(Elf, Male) => 1.02,
(Elf, Female) => 0.96,
(Dwarf, Male) => 0.84,
(Dwarf, Female) => 0.78,
(Undead, Male) => 0.96,
(Undead, Female) => 0.9,
(Danari, Male) => 0.70,
(Danari, Female) => 0.70,
(Orc, Male) => 0.114,
(Orc, Female) => 0.102,
(Human, Male) => 0.102,
(Human, Female) => 0.096,
(Elf, Male) => 0.102,
(Elf, Female) => 0.096,
(Dwarf, Male) => 0.084,
(Dwarf, Female) => 0.078,
(Undead, Male) => 0.096,
(Undead, Female) => 0.09,
(Danari, Male) => 0.070,
(Danari, Female) => 0.070,
},
head_scale: match (body.species, body.body_type) {
(Orc, Male) => 0.9,

View File

@ -187,7 +187,7 @@ impl Camera {
pub fn zoom_switch(&mut self, delta: f32) {
if delta > 0_f32 || self.mode != CameraMode::FirstPerson {
let t = self.tgt_dist + delta;
const MIN_THIRD_PERSON: f32 = 2.35;
const MIN_THIRD_PERSON: f32 = 0.35;
match self.mode {
CameraMode::ThirdPerson => {
if t < MIN_THIRD_PERSON {

View File

@ -499,15 +499,16 @@ impl Scene {
let up = match self.camera.get_mode() {
CameraMode::FirstPerson => {
if player_rolling {
player_height * 0.42
player_height * 0.42 * 0.1
} else if is_running && on_ground.unwrap_or(false) {
player_eye_height + (scene_data.state.get_time() as f32 * 17.0).sin() * 0.05
player_eye_height * 0.1
+ (scene_data.state.get_time() as f32 * 17.0).sin() * 0.05
} else {
player_eye_height
player_eye_height * 0.1
}
},
CameraMode::ThirdPerson if scene_data.is_aiming => player_height * 1.16,
CameraMode::ThirdPerson => player_eye_height,
CameraMode::ThirdPerson if scene_data.is_aiming => player_height * 1.16 * 0.1,
CameraMode::ThirdPerson => player_eye_height * 0.1,
CameraMode::Freefly => 0.0,
};