Browse Source

[Level 2]: Add slow walkway, tweak Hero 0 settings

master
Luna 7 years ago
parent
commit
2fa075c723
5 changed files with 2302 additions and 998 deletions
  1. BIN
      assets/levels/2.blend
  2. +2295
    -991
      assets/levels/2.obj
  3. +4
    -4
      scenes/levels/2.tscn
  4. +1
    -1
      scripts/heroes/0.gd
  5. +2
    -2
      scripts/player.gd

BIN
assets/levels/2.blend View File


+ 2295
- 991
assets/levels/2.obj
File diff suppressed because it is too large
View File


+ 4
- 4
scenes/levels/2.tscn
File diff suppressed because it is too large
View File


+ 1
- 1
scripts/heroes/0.gd View File

@ -7,7 +7,7 @@ const wallride_leap_build = 0.01
var since_on_wall = 0 var since_on_wall = 0
var last_wall_normal = Vector3() var last_wall_normal = Vector3()
var wallride_forgiveness = .150
var wallride_forgiveness = .3
func _ready(): func _ready():
._ready() ._ready()


+ 2
- 2
scripts/player.gd View File

@ -6,7 +6,7 @@ var view_sensitivity = 0.25
# Walking speed and jumping height are defined later. # Walking speed and jumping height are defined later.
var walk_speed = 0.8 # Actually acceleration; m/s/s var walk_speed = 0.8 # Actually acceleration; m/s/s
var jump_speed = 1.5 # m/s
var jump_speed = 5 # m/s
var air_accel = .1 # m/s/s var air_accel = .1 # m/s/s
var floor_friction = 1-0.08 var floor_friction = 1-0.08
var air_friction = 1-0.03 var air_friction = 1-0.03
@ -182,7 +182,7 @@ func control_player(state):
lin_v.z *= floor_friction lin_v.z *= floor_friction
state.set_linear_velocity(lin_v) state.set_linear_velocity(lin_v)
if Input.is_action_pressed("jump"):
if Input.is_action_just_pressed("jump"):
# This may be kinda expensive but we only check while pressing jump so it's ok # This may be kinda expensive but we only check while pressing jump so it's ok
# Detect jumpable # Detect jumpable
var jump_dot = 0.8 # If normal.dot(up) > jump_dot, we can jump var jump_dot = 0.8 # If normal.dot(up) > jump_dot, we can jump


Loading…
Cancel
Save