Adjust first person camera and underwater wield orientation

This commit is contained in:
timokoesters 2020-03-16 13:19:51 +01:00
parent 87acc01d48
commit 4195273cf9
3 changed files with 6 additions and 3 deletions

View File

@ -84,7 +84,10 @@ fn swim_move(data: &JoinData, update: &mut StateUpdate) {
};
// Set direction based on move direction when on the ground
let ori_dir = if update.character.is_attack() || update.character.is_block() {
let ori_dir = if update.character.is_wield()
|| update.character.is_attack()
|| update.character.is_block()
{
Vec2::from(data.inputs.look_dir).normalized()
} else {
Vec2::from(update.vel.0)

View File

@ -14,7 +14,7 @@ use vek::*;
const BLOCK_EFFICIENCY: f32 = 0.9;
const ATTACK_RANGE: f32 = 3.5;
const ATTACK_ANGLE: f32 = 45.0;
const ATTACK_ANGLE: f32 = 70.0;
const BLOCK_ANGLE: f32 = 180.0;
/// This system is responsible for handling accepted inputs like moving or

View File

@ -6,7 +6,7 @@ use vek::*;
const NEAR_PLANE: f32 = 0.5;
const FAR_PLANE: f32 = 100000.0;
const FIRST_PERSON_INTERP_TIME: f32 = 0.05;
const FIRST_PERSON_INTERP_TIME: f32 = 0.1;
const THIRD_PERSON_INTERP_TIME: f32 = 0.1;
pub const MIN_ZOOM: f32 = 0.1;