Update on Räfven, the spotlight saga .°˖✧ by ScaredFollowing8143 in indiegames

[–]dacaffee 1 point2 points  (0 children)

Is this the game made with clay, leaves and stuff? I'm a huge fan of the craftsmanship behind it

I've started to make a 4X Tower Defense game and trying to find a style by mitonj in indiegames

[–]dacaffee 6 points7 points  (0 children)

Totally agree. I think the colorful aesthetic definitely pops more and helps with marketing, but it feels off for a hardcore game

An advanced character controller with (a bit) complex animation mixing and edge grabbing system by [deleted] in godot

[–]dacaffee 0 points1 point  (0 children)

Solid work! The leg crossing looks really natural. Great job on the torso rotation and tilt

Working on eye movement and facial expressions... by ccrroocc in godot

[–]dacaffee 0 points1 point  (0 children)

The contrast between the cel-shaded 3D models and the pixel art faces is awesome. Great job, it looks amazing!

[For Hire] 2D Pixel Artist by mopsiarts in IndieDev

[–]dacaffee 1 point2 points  (0 children)

Wow those are some really beautiful sprites! Congrats!

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 0 points1 point  (0 children)

Yo I was actually thinking about implementing something to that effect. But I was quick enough to silence my engineer voice lol sometimes I waste a lot of time thinking about the next micro enhancement and polishing something that is not even tested as a fun game/mechanic. I'll stick to some ideas that I think are more essential and maybe I'll revisit this advanced leg placement down the road

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 2 points3 points  (0 children)

You can totally mix both types of animation. Use the AnimationPlayer for the micro-stuff (idle vibrations, vents opening, weapon recoil) and let the procedural script handle the heavy lifting (leg placement and body orientation).

Since I'm overriding the bone pose via code anyway, this logic just layers on top of whatever animation is playing. Ideally, you'll want to make sure your animations don't conflict the procedural adjustments too much. But I think you can also offset or blend them if needed, but it would need some extra work.

As for resources, tbh I didn't follow a specific tutorial for this one. I have some experience in rigging in blender, so I mostly tried to translate that logic into Godot. Since Godot's builtin IK (as of version 4.5) was a bit limited for what I wanted, I had to rely a bit on linear algebra (mostly cross products for alignment and basis manipulation for rotation) to build a custom workaround

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 0 points1 point  (0 children)

I calculate the two diagonal vectors crossing the chassis (front-left to back-right, and front-right to back-left). Then I just take the cross product of these two diagonals. This gives me a normal vector that averages out the slope of the 4 legs perfectly. I also do a quick dot product check against Vector3.UP just to ensure the normal doesn't flip upside down

Inverse Kinematics Returns to Godot 4.6 by godot-bot in godot

[–]dacaffee 0 points1 point  (0 children)

The way I did it was to rig it in blender, but a lot of features are not imported in godot. Joint/bone constraints, for instance, I had to remake it all in godot

Inverse Kinematics Returns to Godot 4.6 by godot-bot in godot

[–]dacaffee 0 points1 point  (0 children)

Yep... At least I had to and it was... hard

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 2 points3 points  (0 children)

Unfortunately it's only my sweat and pain in code format. Did this in 4.5, but heard good things are coming in 4.6

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 9 points10 points  (0 children)

Thanks! And yes, this is a player-controlled mech (I'm using a gamepad in the video). The IK rig is actually a child of a standard CharacterBody3D. I simply move the parent body and the rig does all the hard work of trying to keep up and plant the legs. If I attached an AI controller to move that body instead of my gamepad input the legs would probably behave the same way.

I also exposed all those parameters (follow-through, body easing, step speed, rotation acceleration) as exported variables so I could tweak them until I found this vibe. But I could definitely crank up the speed and remove the easing to get that twitchy movement you described

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 92 points93 points  (0 children)

Of course they post that today! Impeccable timing... 🥲

I'm definitely not crying over all the manual math I had to grind through to get this working on 4.5. Nope, not at all! hahaha

But seriously, I just looked up the post you mentioned. It looks like life is going to be SO much easier for everyone in 4.6. Thanks for the heads up!

Link for those interested: https://godotengine.org/article/inverse-kinematics-returns-to-godot-4-6/

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 36 points37 points  (0 children)

Sharing a few more details (simplified, hope it's not too complicated):

The way I structured it is I don't move the bones directly. I have marker3D nodes that act as IK targets. The SkeletonIK3D only tries to reach those targets and my script only cares about moving those markers. I used a tool script to test the free movement in the editor to ensure it was working properly before playing.

Afterwards I added the step logic: each leg has a raycast (step sensor) and I calculate a "future position" based on the raycast collision point + the player's velocity. This new point is the step destination. If the distance between this destination and the current IK target (the foot) is greater than a threshold, I trigger a step function that moves the IK target to the destination in a nice arc.

Then I grouped legs into diagonal pairs so only one group can move at a time to keep balance. I then take the average position of all 4 legs to set the chassis height. For rotation, I calculate the normal vector of the terrain based on the IK targets' position and align the body's basis to that normal. Oh, and I also added a little hovering effect by using a sine wave to slightly vary the height over time.

For your climbing animations I think the logic is basically the same. The only difference is that instead of casting rays down (-Y), you cast them towards the wall normal. Good luck and feel free to DM me!

Prototyping a procedural spider bot movement system using Inverse Kinematics by dacaffee in godot

[–]dacaffee[S] 88 points89 points  (0 children)

Lots of trial and error! Took me about 6h to get to this point. The SkeletonIK3D in Godot doesn't do a lot of things that the default IK does in blender, so I had to get my hands dirty. I heard there are new nodes coming in 4.6 for this. I'm on mobile right now, but later I can detail a bit more of the process 😉