MENU

Fun & Interesting

Jiggle Physics in Godot

CoderNunk 102,619 10 months ago
Video Not Working? Fix It Now

Here’s how you can add secondary animation movement dynamically to your characters in your Godot game! Jiggle Physics can be used for a wide variety of appendages such as hair and clothing as well. Written Guide: https://codernunk.com/tutorials/godot-jiggle-physics/ COMPLETE 3D character modeling guide: https://www.youtube.com/watch?v=dd6G2S6MQ6U ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 🌐Written tutorials, news and more: https://codernunk.com 🎮Discord: https://discord.gg/7hbjuAeatM 🦋Bluesky: https://bsky.app/profile/codernunk.bsky.social ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Video Chapters: Intro: 00:00 How do Jiggle Physics Work?: 00:29 Animating Jiggles Directly into Your Animations: 02:26 Softbody or Rigidbody Simulations: 06:03 Using Rigged Bones for Jiggle Physics: 07:04 If You Don’t Want Too Many Jigglebones in Your Scene: 11:07 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Addons used: Jigglebone: https://github.com/yaelatletl/godot-jigglebones Jigglebone (without editor feature): https://github.com/TokisanGames/godot-jigglebones Wigglebone: https://github.com/detomon/wigglebone Wiggle Bone (Blender): https://blenderartists.org/t/wiggle-bones-a-jiggle-bone-implementation-for-2-8/1154726?u=peetie ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ The Code Used: ### jigglebone_init.gd ### extends Skeleton3D const JIGGLEBONE_SCENE = preload("res://addons/jigglebones/jigglebone.gd") @export var jigglebone_config: Array[JiggleboneConfig] func _ready(): for i in get_bone_count(): var bone_name = get_bone_name(i) for cfg in jigglebone_config: if bone_name.contains(cfg.name_pattern): var jigglebone = JIGGLEBONE_SCENE.new() jigglebone.name = "JiggleBone_" + bone_name jigglebone.bone_name = bone_name jigglebone.stiffness = cfg.stiffness jigglebone.damping = cfg.damping jigglebone.forward_axis = cfg.forward_axis add_child(jigglebone) ### jigglebone_config.gd ### class_name JiggleboneConfig extends Resource enum Axis { X_Plus, Y_Plus, Z_Plus, X_Minus, Y_Minus, Z_Minus } @export var name_pattern: String @export var stiffness: float @export var damping: float @export var forward_axis: Axis = Axis.Z_Minus ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Video Sources: https://pixabay.com/illustrations/road-path-motivation-silhouette-5567278/ https://cdn.pixabay.com/video/2021/01/27/63040-505518614_tiny.mp4 https://cdn.pixabay.com/video/2022/03/02/109373-684065488_tiny.mp4 https://www.youtube.com/watch?v=g55QvpAev0I&t=8s https://www.youtube.com/watch?v=Zv7bF4TwZTo https://www.youtube.com/watch?v=lS_qeBy3aQI https://www.youtube.com/watch?v=4OxphYV8W3E https://www.youtube.com/watch?v=1cXyIjaFxXY https://www.youtube.com/watch?v=MAPQnjAf6tw https://www.youtube.com/watch?v=_SxB5xrLGhQ https://www.youtube.com/watch?v=_hnYvYa5k0Q #godot #blender #gamedev #gamedevelopment #3dgames

Comment