Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

I'm glad you liked it :D

For the wall jump:

Basically check if we are running on the wall and we press the jump. Then, check which side we are wall running on and get the normal of the wall (I'm using 2 rays that extent out horizontally from the player on opposite sides). Then, get where our player is facing but take out the vertical direction. Last, apply to velocity by adding the force to push away from the wall, the force to jump slightly up from the wall, and the force that launches us forward based off where we face. And each of these forces are multiplied by a multiplier for adjustment.

# Player script
if is_wall_running:
    if Input.is_action_just_pressed("jump"):
        var wall_normal = Vector3.ZERO                          
        if left_wall_ray.is_colliding():                 
            wall_normal = left_wall_ray.get_collision_normal()             
        elif right_wall_ray.is_colliding():                 
            wall_normal = right_wall_ray.get_collision_normal()      
                        
        var forward_dir = -global_transform.basis.z             
        forward_dir.y = 0.0             
        forward_dir = forward_dir.normalized()  
            
        velocity += (wall_normal * push_away_force) + (Vector3.UP * jump_up_force) + (forward_dir * forward_momentum)        
        is_wall_running = false

Oh my god you even added the code! Thanks a bunch! That will be very useful to me in the future <3

(+1)

No problem. Happy to share and explain