GODOT 4 THIRD PERSON PARKOUR (WIP)
HTML-код
- Опубликовано: 4 сен 2024
- After playing with UE5.4 sample demo, i fell in love with it. I just wish i can replicate that project into godot. Adding new feature is fun an all, but this project just take too long to make. So, i decided to called it quit for now and release it as is. I'll add new feature on future update.
Demo project: www.mediafire....
Patreon: / brok3ncircuitproject
This is awesome, I spent like 2 months just to get some "just ok" animations for my prototype character, I cannot imagine the amount of effort it took to make this locomotion system
To be fair, this is an accumulation of 8-9 month of work since I started godot journey.
@@Brokencircuitboard were the actual animations that took too long to make or was it the coding of the interactions?
@@edzu2771 Maybe both 😅
Nailed it! Gotta study this project anytime. Also amazing to see how influential and groundbreaking Rosen's approach, after all these years it still helping out indie devs.
This is incredible! Excited to see what else you can pull off in Godot!
Amazing work! The amount of dedication you put into this really shows. Love the small details you added to make it flow better :)
Just make one more third person shooter example and you be the GODot
I like it, looks pretty awesome!
This man mastered godot 🔥🔥
Make tutorials bro!
This looks really good. I noticed some of the vaulting/mantling animations seem to really slow/stop the character's momentum. Is there a way to maintain the character's momentum as much as possible? I think it would feel better, but like I said, this looks really good even as it is.
For mantling, it easy to do since the the surface is wide. Vaulting in the other hand, we need to fine tune the animation to make sure the hand landed on small vaulting point. I purposely left one ridiculous vaulting animation to show the variety of animation we can use for this mechanic 🤣
@@Brokencircuitboard are you IKing the hands to grab a plausible position or are the animations static?
@@NICK.... No ik.
@@Brokencircuitboard
ah, i have wondered how hard it would be to make ik in godot
@@NICK.... Tbh i am not a fan of godot ik.
Slick stuff 👍🏽
great job
Awesome! Always wanted to see if some mechanic in Unreal can also be done in Godot.
Quick question, is the animation of the player's parkour custom-made or from an asset store? And does making the animation smoother require further coding or using better animations?
Most of the animation is either from free marketplace asset or mixamo. Since the skeleton is different, i need to edit most of them with blender. That's the reason why some animation look weird(especially the hand). For smoother animation, good animation is a plus. I found using animationtree is better for smoother transition between animation. I just set xfade time to 0.1 for all transition.. you be surprise by the result.
@@BrokencircuitboardSo that's how the animation can look so smooth yet so inconsistent, it's that fade effect. Genius!
Honestly, it's already impressive enough seeing it almost emulating the Unreal version.
Very nice, how did you make the leaning? Is the leaning based on the player's velocity?
Yes it is. You have to take into account the current velocity with previous velocity and get the cross product of it.
@@Brokencircuitboard Alright thx
@@BrokencircuitboardThe cross product is always 0 in mine. Am I doing it right?
@@unfunnyman76 I can only guess without the actual code. Maybe you don't store the value of previous velocity?
@@BrokencircuitboardIt works now. I misplaced the leaning logic after the prev_vel = current_vel. My bad, thanks for answering though.
nice
wow, can you make a third person shooter?
This looks alot like inside
How long did you work on this game perday?
Hard to say. It took me a total of around 3+ week of work. Around 1-2 hour daily and sometime more than 12 hour depending on the free time i got 😅
im ready to pay to get a course on this
Hi, i don't lock my tutorial behind a paywall. Making a video tutorial is just simply take too much time. I'll upload the tutorial when i got the time. You can also subscribe to my patreon to get access to the source code of the project.
Scuffed 😂
layer mask animation ?
hey does your patreon also has the tutorial on this
bro plz make tutorial
didn't you used root motion?
I do. But root motion alone is not the answer to everything. For this project I use use root motion, non root motion and semi-root motion.
Please give me your ledge grab system 🙂
Still better looking and more realistic on UE, sorry about that...
Agree. Can't compete with multibillion company and dozens of their professional talent.
extends CharacterBody3D
@onready var ca = $ca
@onready var v = $v
@onready var animation_player = $v/akai/AnimationPlayer
var SPEED = 1.5
const JUMP_VELOCITY = 4.5
var run_speed = 10.0
var walk_speed = 1.5
var run = false
var jump = false
@export var sens_horizontal = 0.5
@export var sens_vertical = 0.5
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
func _input(event):
if event is InputEventMouseMotion:
rotate_y(deg_to_rad(-event.relative.x * sens_horizontal))
ca.rotate_x(deg_to_rad(-event.relative.y * sens_vertical))
v.rotate_y(deg_to_rad(event.relative.x * sens_horizontal))
ca.rotation.x = clamp(ca.rotation.x, deg_to_rad(10), deg_to_rad(-12))
func _physics_process(delta):
# Add the gravity.
if not is_on_floor():
velocity.y -= gravity * delta
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
if animation_player.current_animation != "f/jump":
animation_player.play("f/jump")
else:
if animation_player.current_animation != "f/fall":
animation_player.play("f/fall")
jump = true
else:
jump = false
if Input.is_action_pressed("run"):
SPEED = run_speed
run = true
else:
SPEED = walk_speed
run = false
var input_dir = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if direction:
if run:
if animation_player.current_animation != "f/run":
animation_player.play("f/run")
else:
if animation_player.current_animation != "f/walk":
animation_player.play("f/walk")
v.look_at(position + -direction)
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED
else:
if animation_player.current_animation != "f/idle":
animation_player.play("f/idle")
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED)
move_and_slide()
Dude can u help me
I need help
My jump animation not work playing
If i press jump not playing jump animation and he jump with idle animation
How to fix this
set idle to play only on floor.
@@Brokencircuitboard
How
Where create that set
Idk
@@Mikail4044 can't help much without full project. but maybe you can try
else:
if is_on_floor():
if animation_player.current_animation != "f/idle":
animation_player.play("f/idle")
@@Brokencircuitboard thanks dude i will try
Please give me your ledge grab system 🙂