What’s The Problem? Sometimes you want to do some calculations based on the current view, such as a ray/plane intersection to figure out where the player is looking. A lot of information online will immediately tell you to “get the camera component and…”. ⛔ NO! ⛔ If you do this you’ll get some weird edge cases where the results that gives you are just plain wrong. The transform of the camera component on your pawn is NOT the current player view; even when it’s the camera you’re posessing right now.
The Requirement Niagara is great for simulated particle systems, but its renderers seem pretty useful for non-simulated things as well. What if I just want to give Niagara a set of points, and tell it to use those as particles? My use case was a “throwing arc” visualisation, for when you’re aiming a thrown projectile. UE provides you with helper functions to generate a list of points from a given start position and velocity (see the “Predict Projectile Path” suite of functions), and I want to display that in the world to preview where I’m throwing it.
Why? With all the assets that make up a game, it’s easy to forget a setting or two sometimes. One of our most common mistakes is forgetting to set up Sound Attenuation for a given sound wave / cue. If you forget to assign attenuation settings for a sound, it’ll always play at full volume regardless of where it is in the world in relation to a player. In a multipplayer game like ours, it can be even easier to miss because if the sounds are made by the player, you don’t notice that they’re not being attenuated.
Making multiplayer games is hard. Keeping things responsive for the local client, while still keeping everything consistent on the server which controls it all, which is always a non-zero number of milliseconds of network traffic away, is a tough problem. Unreal Engine has your back for the most part, its in-built replication and multiplayer support is pretty robust. Character controllers automatically let you control your own character responsively, while keeping it in sync for everyone else.
Have you ever had problems with textures being blurry when you render to textures in Unreal using a Scene Capture Component 2D? Maybe you’ve searched for the problem, and come across forum threads that give really terrible advice, such as turning off texture streaming, or adding a global boost to all texture LODs? If so, you’re me earlier today. The difference is, I can save you some time and give you a better solution.
You can use Animation montages to play ad-hoc animations on a character. While your animation blueprint is stateful, montages are useful to just do a one-off animation like a reload, a hit reaction, or an emote. But, if you’re making a multiplayer game, calling “PlayAnimMontage” on the character is only going to play it locally. If you want other players to see it, you need to replicate it. Ideally, you want that replication to handle lag, so that animations are mostly synced up across players.
Just a quick post today about a very weird error I encountered while trying to package a project with Unreal 5.3; and because I got zero search hits for it on the web, I figured I’d document how I fixed it to save others in the future. Here’s the error I got while trying to package this UE project, either from the editor or the command line: LogObj: Error: LoadConfig (/Script/BlueprintGraph.
It’s always better to drive your game’s systems from data that’s easily editable. Games require a lot of iteration, and if you can just play with settings on the fly instead of having to change code, you can try things out much faster, and everyone on the team can experiment, not just programmers. A key asset type for this in Unreal is the DataTable. You make a row struct, then fill it with whatever data you like.
Why I Use Note Taking Apps My memory sucks. Partly that’s age, but if I’m honest, it’s never been that good. For years now, whenever I learn something useful, I make sure I put it in a searchable note taking system so that I can find it again later. Sometimes, I even blog about it, and read my own blog later to remind myself of the details 😀 But I always make sure my notes repository has a mention of it & link, so I don’t have to remember whether it’s on my blog, in one of my browser tabs or favourites, or in a 3rd party web saving system like Pocket or whatever.
Just a quick post today about how I replaced our doorbell with a custom Zigbee button and Home Assistant, running on an old Raspberry Pi 2 I had sitting in a drawer, which pings our phones when someone presses the button, instead of ringing a regular chime. If this interests you, read on! Whyyy? Good question! Our cat Harry, who we adopted from the shelter a couple of years ago, is terrified of all humans except us.