mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'animtweaks' into 'master'
small anim tweaks See merge request veloren/veloren!2039
This commit is contained in:
commit
5918fbed74
@ -201,18 +201,18 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
Self {
|
Self {
|
||||||
scaler: match (body.species, body.body_type) {
|
scaler: match (body.species, body.body_type) {
|
||||||
// TODO : Derive scale from body proportions
|
// TODO : Derive scale from body proportions
|
||||||
(Orc, Male) => 1.14,
|
(Orc, Male) => 0.114,
|
||||||
(Orc, Female) => 1.02,
|
(Orc, Female) => 0.102,
|
||||||
(Human, Male) => 1.02,
|
(Human, Male) => 0.102,
|
||||||
(Human, Female) => 0.96,
|
(Human, Female) => 0.096,
|
||||||
(Elf, Male) => 1.02,
|
(Elf, Male) => 0.102,
|
||||||
(Elf, Female) => 0.96,
|
(Elf, Female) => 0.096,
|
||||||
(Dwarf, Male) => 0.84,
|
(Dwarf, Male) => 0.084,
|
||||||
(Dwarf, Female) => 0.78,
|
(Dwarf, Female) => 0.078,
|
||||||
(Undead, Male) => 0.96,
|
(Undead, Male) => 0.096,
|
||||||
(Undead, Female) => 0.9,
|
(Undead, Female) => 0.09,
|
||||||
(Danari, Male) => 0.70,
|
(Danari, Male) => 0.070,
|
||||||
(Danari, Female) => 0.70,
|
(Danari, Female) => 0.070,
|
||||||
},
|
},
|
||||||
head_scale: match (body.species, body.body_type) {
|
head_scale: match (body.species, body.body_type) {
|
||||||
(Orc, Male) => 0.9,
|
(Orc, Male) => 0.9,
|
||||||
|
@ -187,7 +187,7 @@ impl Camera {
|
|||||||
pub fn zoom_switch(&mut self, delta: f32) {
|
pub fn zoom_switch(&mut self, delta: f32) {
|
||||||
if delta > 0_f32 || self.mode != CameraMode::FirstPerson {
|
if delta > 0_f32 || self.mode != CameraMode::FirstPerson {
|
||||||
let t = self.tgt_dist + delta;
|
let t = self.tgt_dist + delta;
|
||||||
const MIN_THIRD_PERSON: f32 = 2.35;
|
const MIN_THIRD_PERSON: f32 = 0.35;
|
||||||
match self.mode {
|
match self.mode {
|
||||||
CameraMode::ThirdPerson => {
|
CameraMode::ThirdPerson => {
|
||||||
if t < MIN_THIRD_PERSON {
|
if t < MIN_THIRD_PERSON {
|
||||||
|
@ -499,15 +499,16 @@ impl Scene {
|
|||||||
let up = match self.camera.get_mode() {
|
let up = match self.camera.get_mode() {
|
||||||
CameraMode::FirstPerson => {
|
CameraMode::FirstPerson => {
|
||||||
if player_rolling {
|
if player_rolling {
|
||||||
player_height * 0.42
|
player_height * 0.42 * 0.1
|
||||||
} else if is_running && on_ground.unwrap_or(false) {
|
} 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 {
|
} else {
|
||||||
player_eye_height
|
player_eye_height * 0.1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CameraMode::ThirdPerson if scene_data.is_aiming => player_height * 1.16,
|
CameraMode::ThirdPerson if scene_data.is_aiming => player_height * 1.16 * 0.1,
|
||||||
CameraMode::ThirdPerson => player_eye_height,
|
CameraMode::ThirdPerson => player_eye_height * 0.1,
|
||||||
CameraMode::Freefly => 0.0,
|
CameraMode::Freefly => 0.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user