Uploaded November 2022 | Updated September 2026, 2 weeks ago
Making sword attacks deal damage to enemies or players with a knockback movement applied on hit.
Reference Project Patreon Download ➣ patreon.com/posts/2d-platformer-73894085
2D Crash Course Platformer Tutorial Playlist ➣ youtube.com/playlist?list=PLyH-qXFkNSxmDU8ddeslEAtnXIDRLPd_V
Play the Project in Web Browser ➣ chris-tutorials.itch.io/platformer-crash-course-reference-project
➣ Downloadable Assets, Video Courses, and Other Places to Follow Me
patreon.com/christutorials
chris-tutorials.itch.io
https://linktr.ee/ChrisTutorials
◢ Chris Recommends ◥
Master Skills with Skillshare Video Courses ►► skillshare.com/r/user/christutorials?gr_tch_ref=on
Save Money Shopping Online with Honey Extension ►► joinhoney.com/ref/qd04c25
0:00 What to Expect
0:26 Knight Sword Swing Attack
4:09 Attack Component Script
6:56 Set Up Attack Layer and Collider
8:40 Testing and Adjusting Knight Attack
10:29 Turning On Attack Looping
11:33 FIX: Health less than 0 Alive Check
15:43 Respond to Hit with UnityEvent
18:08 Apply Knockback OnHit
18:37 Hit Trigger
21:39 Player Hit Animation
22:36 Player Hit Transitions
23:17 IsHit on Exit set to False
25:20 Set Hit Trigger
26:17 Lock Velocity on Player Controller
27:12 FIX: SetBoolBehaviour ValueOnExit
27:44 Knockback and LockVelocity Testing
30:05 Player Attack
32:22 Moving Velocity Lock to Damageable Component
34:54 Knight Damaged and Hit State
38:55 FIX: Attack Collider Position Flip with Scale
41:10 FIX: Attack Knockback Direction Flip
42:45 Wrapup
Making sword attacks deal damage to enemies or players with a knockback movement applied on hit.
Reference Project Patreon Download ➣ patreon.com/posts/2d-platformer-73894085
2D Crash Course Platformer Tutorial Playlist ➣ youtube.com/playlist?list=PLyH-qXFkNSxmDU8ddeslEAtnXIDRLPd_V
Play the Project in Web Browser ➣ chris-tutorials.itch.io/platformer-crash-course-reference-project
➣ Downloadable Assets, Video Courses, and Other Places to Follow Me
patreon.com/christutorials
chris-tutorials.itch.io
https://linktr.ee/ChrisTutorials
◢ Chris Recommends ◥
Master Skills with Skillshare Video Courses ►► skillshare.com/r/user/christutorials?gr_tch_ref=on
Save Money Shopping Online with Honey Extension ►► joinhoney.com/ref/qd04c25
0:00 What to Expect
0:26 Knight Sword Swing Attack
4:09 Attack Component Script
6:56 Set Up Attack Layer and Collider
8:40 Testing and Adjusting Knight Attack
10:29 Turning On Attack Looping
11:33 FIX: Health less than 0 Alive Check
15:43 Respond to Hit with UnityEvent
18:08 Apply Knockback OnHit
18:37 Hit Trigger
21:39 Player Hit Animation
22:36 Player Hit Transitions
23:17 IsHit on Exit set to False
25:20 Set Hit Trigger
26:17 Lock Velocity on Player Controller
27:12 FIX: SetBoolBehaviour ValueOnExit
27:44 Knockback and LockVelocity Testing
30:05 Player Attack
32:22 Moving Velocity Lock to Damageable Component
34:54 Knight Damaged and Hit State
38:55 FIX: Attack Collider Position Flip with Scale
41:10 FIX: Attack Knockback Direction Flip
42:45 Wrapup










