XaiJu
Megan Fox

Megan Fox

patreon


Megan Fox posts

Been a minute, so lemme show you my hordes

Sorry for the lack of updates, I've been head down in intense C++ coding land doing, well. THIS. Getting this to work took an absurd number of incremental steps, some of which I'll probably do blogs about later, but BEHOLD. 6k mooks, rushing across a field, all animating and moving independently, at above 30fps, in a scene that's overall also not terribly optimized (that grass and hedge are kind of silly expensive).

Lemme give you an overview at least. This won't tell you exactly how to...

View Post

Three ways of doing hitstop (which adds weight to hits)

Right, so, hitstop! Lemme just start by showing you what I mean.

This video has hitstop: https://bsky.app/profile/glassbottommeg.bsky.social/post/3llilnykdvs2l

This does not: https://bsky.app/profile/glassbottommeg.bsky.social/post/3llilpz33722l

See the dif...

View Post

Fake Gravity 2.0

So, previously I did a post about Metroid Prime style fake gravity. Basically, to get the best of both worlds of thumpy heavy gravity and good air control during platforming, you adjust the player's (and only the player's) gravity scale based on the state of their jump button. Neat stuff! Pop over here to read it.

Read it? Ok, good, now let's make it better.

Smoothing The Gravity Out View Post

Ah, holidays are over, time to blog again

Hiya again! Did that flurry of posts n stuff, then descended into holiday fog, but new year, new "oh hey right I should be blogging!" so yep. I'll catch back up on stuff. Happy new year y'all!

Also, I hugely appreciate your support. Stapling together an income as a creative is tricky, and I appreciate all of y'all kicking in what you can, it really does help a bunch! Also it gives me an excuse to blog about silly stuff, which I especially appreciate. So, yaaaay 2025 LET'S GOOOO-

View Post

Did you know you can copy Unreal Graph, edit it, then paste it?

Right, so you probably know you can copy-paste Unreal graph stuff - Blueprints, Materials, ControlRig, etc - but have you ever tried pasting it somewhere that wasn't Unreal?

Go on! Try it! Looks a bit like this. Pages and pages of this:

Which, you know, isn't immediately useful. Unless we get crafty. Say you've got a node group like this in your Landscape Material:

2024-10-20 19:08:00 +0000 UTC View Post

How to use skeletally-mismatched animations in Unreal

(yet another bonus blog cus it came up in email)

This becomes relevant if you ever want to use the Manny anims with a different skelly, or similar cases where you grab an asset pack on the marketplace with cool animations specific to their skeleton. I'm not saying this is necessarily ideal. For IDEAL results, use Unreal 5's new Runtime IK Retargeting View Post

How to share animations across skeletons in UE5

(bonus blog time! because this came up in an email so I figured OMG THIS ISN'T COMMON KNOWLEDGE BUT IS SUPER IMPORTANT, so here we go!)

Right, so, first! Unreal's skeletal retargeting is INCREDIBLY powerful. It'll work on just about any skeleton. If you truly need to re-target a humanoid animation onto a centaur, they're the tool for the job. There's two forms of it, either runtime retargeting or the in-editor baked out sort.

But. There's a simpler way.

The Simple Way

<...

View Post

Reducing sound pileups

So you've got a giant pile of smashables for. Well. Let's be honest this is probably a bad idea. And yet, this scene exists in a ton of games.

Because we look at it and go, oh geeze that's gonna be so cool to smash. It'll be ok. Let me have this. The player demands it.

And the instinct isn't wr...

View Post

(poll) Which of these things interests folks more?

So! I've kinda dug deep on a couple of things lately, and I'm also migrating old code over from old project to new- which means I'm doing a lot of "oh god why did past-me do it that way" and refining my opinions on everything from animation-driven player movement to how hitboxes et al work.

SO! Before I pick one of these, do folks got preferences?

Relevant terms/explainers

"What's an animation rig?" this thing. The process of "rigging" is the process by which you make and ...

View Post

One optimal way of driving UMG (Unreal UI)

So you're a Unity developer switching to Unreal. You hop into this new UI system called "UMG", and at first glance, it seems alright? So you go to make your 9-slice window image base so you can begin and-

You've already doomed yourself. You just don't know it yet. Your next week is full of screams.

Now, before I continue, let's set some ground truths:

1.) I don't claim to be a UMG expert

2.) Everyone's got different ways of leveraging UMG, and if the system supports it...

View Post

Teensy update

Was hoping to have a post about UMG / Unreal UI up by now, but I'm still neck deep in it heh. Still though! Soon. I spent the last while walking through a sea of rakes, trying to figure out how the heck to drive UI in a way that works with Unreal's preferences/limitations, and I'm hoping to spare others some of that pain.

View Post

How I make color palettes (part 2 of 2)

When last we left our daring colors, they were here:

Not bad, really! This is what you get from direct sampling, and that's fine. Potentially you stop here if you were doing, I don't know, painting? If all you need is a conceptual palette? But oh no no, we're not stopping there, because today, our ...

View Post

How I make color palettes (part 1 of 2)

Lately the work I've been doing is more branding adjacent, and I realized: maybe this would also help folks? So here!

Programmers, artistically dense friends, I was once like you. Or rather, am still like you compared to proper artists, but in the land of the blind, etc etc. So here, allow me to pull back the curtain: here's (one way / my way) to pick color good.

Don't Just Pick Naked Colors

This process does not begin with the color wheel, and it sure as heck doesn't begi...

View Post

On Combat Tracing, and Overcomplication

So I've got this fancy swept pill tracing system, right? It's a whole thing. Spent probably months refining that whole process. Recently I added on an extremely fancy fake-cone tracing system that works on a similar principle!

Which I don't recommend using, at all! Because while it works great (sort of...

View Post

Switch Systems 201

I did a post on Switch systems waaay back in 2017: https://www.patreon.com/posts/switch-systems-11462060

and it's, you know, fine! But it was for Unity, and I feel like I've learned a lot about how these things work since. I've written a version of my Switch system for every single game I've done since then, so I'm on, what, revision 4 of this thing? So yeah! Let's dig in a little deeper.

View Post

Getting a sense of weight WITHOUT impacting platforming

You've all had the usual debate, I'm sure, when it comes to setting gravity. You're looking at the behavior of the world as you increase gravity, and hey things fall better, it's nice! But then go you try to platform and bwoooop you fall like a dead weight. So that won't work.

But what if it COULD!

And what if I told you that this is one of the many tricks used in Metroid Prime to make their 3D platforming feel awesome? (though I'm sure other games have done it too)

There's ...

View Post

How that SuggestProjectileVelocityFromPeakHeight works

You might have seen that node and gone "huh", and yeah! It's something I adapted from a friend's math library. I don't claim credit for the logic at the core here, most of what I did is move stuff around to make it work as a clean BP node.

The gist is that this calculates a lofting velocity based on a start point, an end point, and the desired maximum height you'll reach along the arc. Most other projectile velocity calculators require you to know the initial speed ahead of time, or pro...

View Post

Making an Unreal navlink that can make NPCs jump gaps

This isn't even just making NPCs jump. This is the tech you need for making NPCs use ladders, or do power teleports across gaps, or any navmesh-ignoring point to point traversal verb you can think of. And you CAN do it in Blueprint!

Sort of. Mostly. You do need some C++, but don't worry I gotcha:

.h - https://pastebin.com/rBiMDv8h

.cpp - htt...

View Post

Moving the CharacterMovementComponent procedurally, without root motion

Right, so, let's set the stage: you're doing a sword swing animation, and we want it to feel like a concise movement instead of a button mash you hit while randomly moving around. To pull that off, we need to block player movement input for a sec. Except, oh no! Now the attack animation freezes you in place while it plays. That feels bad, attack animations need to close distance for a whole bunch of reasons. So how do we do that?

Root Motion

Well, one way is root motion! Which, ...

View Post

Gotchas with Unreal's Fracture system

I hit a bunch of issues with this initially, so thought I'd run folks through the process, and a couple of hurdles I hit.

1.) Don't start with a big whole-mesh shatter

When you shatter, it's going to create some creepy things, which you'll want to prune. But. If you just shatter from the start, the weird bits will be invisible, and it'll come through as weird little shar...

View Post

Don't be afraid of macros

For ages, I avoided using Blueprint macros. Theoretically they can shatter in some obscure cases but, seriously, you should use them more often. They can save you a ton of time. Like this thing! It's just a little for-each loop. Simple, but, executing this without a macro means cluttering up your code with an entire local variable that does nothing but sit there and count. Who needs that?! Nobody. That's who.

2023-09-21 19:21:57 +0000 UTC View Post

"Select" nodes are for everything. EVERYTHING.

I'm back a post, and this made me giggle, so thought I'd share it. Here's how to make a macro that spits out a randomized trans flag color. Note the stacked select, which biases correctly (trans flags have half as much white as they do the other colors).

Now, why would you want to do this? Well. Um. Look I was just making macros and had an idea. But the POINT is that "Select" is incredibly pow...

View Post

A bit more on AnimNotifyStates

I casually mentioned how these are the hub of the "attack-defining Montage that does all the things" approach in that last post, but I wanted to talk specifically about the two ways you can do this.

There's basically two approaches: either the AnimNotifyState proactively reaches out and sets variables in the thing managing the skeletal mesh it's running on, OR, it registers itself when it starts and unregisters itself when it stops, and there's some good reasons to do both.

Now, b...

View Post

The C++ code for AnimNotifyState access

This is just the C++ you need for for that AnimNotifyState conversion thing. Super simple, but here, saves you a few minutes

View Post

Using Montages as all-in-one attack definitions

This isn't so much a dense piece of code as, a way of thinking of existing systems to make them do more than you might expect.

In this spirit, let us consider the humble AnimNotify. Easily missable, and so not to be used for required-reliable actions, since for anything that necessarily has a start and an end, you might blend out before the end notification. But then let us consider their sibling, AnimNotifyState. Ah! Now here is a system with class. It can do everything an AnimNotify c...

View Post

The right way to attach a mesh to a socket in Unreal

This is another of those things that was super frustrating to google, with a ton of bad answers, and it's possibly because of a UI bug! I'm leaving this public as a result, so maybe a good answer will be findable. So let's dig in:

If you search around on this topic, you'll mostly find people settling on the "right" way being AttachComponentToComponent, and that's. Fine. That isn't wrong. But. It's limited. You'll generally need to snap-to-target if you attach this way, which means there...

View Post

This is how, in Unreal, to tell if a pawn is local or not

I'm a bit behind on posts, so I'm just kicking this one out now, because I spent a very angry couple of hours and found no good explanations. Took a friendly person on a Discord.

Anyways, this is how to tell (in Unreal Blueprint but there's C++ analogs of the function) if any given actor is "local" to you, in a durable way. This will function regardless of whether you're in single-player, a client of a ListenServer, actually running AS a ListenServer, or a client connected to a dedicate...

View Post

Health/Damage Swept Pill Tracing

EDIT: Make sure you also read my later realization about this system, heh

You maybe saw that trace call in my damage tracer and wondered, what the heck is that?

Easy! It's the function I use to trace SWORDS, by treating them as a bunch of swept spheres, and I place those spheres along the sword by stepping between a couple of sockets that market the start and end points of the live blade....

View Post

Health/Damage/Death handling in Unreal

There are a bunch of ways of going about damage systems in Unreal, but the first key takeaway here is that: Unreal doesn't exactly provide a health or damage system. They give you functions, that are exposed in sometimes useful ways, but they don't actually do anything on their own. Nothing even touches the arguments, they're just passed through as-is. Which means when you approach the system, you might be wondering how you Should do things, and the answer is kinda- well, however you want? View Post

Looping animations with non-looping in/out anims

(this would be the March code post a few days late, sorry about that! GDC and the halo around it kind ate time, heh)

Imagine you want to animate a bird unfurling their wings, flapping them or holding them out to glide for (some gameplay-variable amount of time), and then gracefully fold them back up. You're probably not making a bird game, but that kind of prepare -> do thing for a while -> recovery flow is super common in games.

So, how do we do this in Unreal?

Easily...

View Post