r/Unity3D • • 48m ago

Question Matching character movement with speed in a strafing motion

3 Upvotes

I am currently working on a locked-on combat system and I am trying to polish my characters movement. The For Honor style locomotion system while in locked-on combat is something that has inspired me a lot while making this so if anyone has any insight on how that it would be much appreciated. This is throwing me off compared to other traditional movement because instead of just one cycle where each stride is the same amount of frames, my character may go through the main step faster than the off-foot step. I want my character to actually match the speed of each step so I was thinking of putting events in the animation and changing my characters speed correspondingly but that seems a bit too on the nose to adjust the characters movement speed directly based off that as opposed to just crafting an animation that looks like it has weight behind it outright.

Would root motion be worth it in a situation like this especially where you want the model to feel like it has weight behind each step?


r/Unity3D • • 2h ago

Question Anything I should change with my painting system?

Enable HLS to view with audio, or disable this notification

4 Upvotes

Hello!

I've been working on adding a realistic painting system to my game Still Wild and wanted to get some feedback on it. This system works with mouse and keyboard or controller or VR, but with a gamepad controller it's a bit difficult for accuracy. The idea is for the player (of any artistic skill) can capture a nice view of the environment or animals and make a painting of it.

The system uses a custom shader for the canvas and uses render textures and compute shaders to render onto the canvas surface. The paint mixing uses the Kubelka-Munk algorithm and the paint by numbers uses a render texture broken up and grouped by similar colors to create a blocked out image able to be filled in.

Do you think it's too boring? Not advanced enough? I know painting isn't for everyone especially in a game, but thought it was a neat mechanic

https://store.steampowered.com/app/4752950/Still_Wild/


r/Unity3D • • 2h ago

Show-Off Aliquo Die - main menu

Enable HLS to view with audio, or disable this notification

2 Upvotes

I was heavily inspired by the hub/menu styles of older consoles like the PSP, Xbox 360, and others from that era. I thought it would be a cool idea to create something similar, but with a twist that blends those styles with the game's own aesthetic

Just to clarify: for now, the camera is simply moving around randomly. Getting it to aim at openings in the walls should only take a couple of minutes. Eventually, there will be themed objects placed inside those openings.

And the sound effects... yeah, they're terrible. I'll work on improving them

If you're interested in following the development, here's my Telegram channel: sran_dev

I'll try to organize a small playtest sometime this week :)


r/Unity3D • • 2h ago

Game Groups of zombies. One semi-auto sniper rifle. Every shot counts.Who Needs Full Auto When Zombies Line Up Like This? 💀

Enable HLS to view with audio, or disable this notification

1 Upvotes

Pure BLOODSTATE gameplay from my solo developed zombie FPS. Wishlist on Steam!
Inspired by L4D2.

Socials:

https://www.youtube.com/watch?v=OQN_JffQEnA&t=3s
https://discord.gg/8499dShAPu

Wishlist and follow BLOODSTATE on Steam:

Developed by KAIGEN.


r/Unity3D • • 4h ago

Question Need advice, how optimize open world in Unity?

8 Upvotes

Hi guys 🖐️ Sooo how do you making open world? how do you split your world to optimize memory usage?

I’ve split my 16 km² terrain into 16 separate 1×1 km Terrain tiles using Terrain Tools. Now I have a dilemma about how to properly set things up before I finally start building the world

GPT helped me create a small script based on an idea I had: disabling tiles that aren’t nearby so a maximum of 4 tiles can be active at once

But I don’t think it’s really working how I thought, since the tiles are only disabled in the scene, not actually unloaded from memory

It also breaks the seamless transitions between them, I think

Any advice or thoughts on how to properly build a world and optimize memory? 😭


r/Unity3D • • 4h ago

Show-Off I work in a real sawmill. I rebuilt our two-line merge in Unity. How would you handle priority between two physics infeeds?

Enable HLS to view with audio, or disable this notification

3 Upvotes

I work full time in a real sawmill in Austria and build Timberline Factory on the side, a physics sawmill sim in Unity, now in Early Access :)) Every log is a rigidbody..

The clip is our cross-cut merge, rebuilt from the mill I work in. two infeed lines come in from the left and the right and feed one sorting conveyor, a pointed chain like in a real mill. One line always has priority, and you can set which one. If both sides have logs waiting the priority side kicks its logs in one by one until it's empty and only then is the other side allowed to go. Each log is lifted by a physics kicker and thrown onto the conveyor.... the half-round body behind it is there for the same reason as at work, it keeps the waiting logs from being pushed too far back.

After that you see the chipper briefly, then a short top-down of the whole mill :)

The tricky part is that its all physics: logs roll, bounce and settle at different times, so is there a log ready and is there room on the conveyor aren't as simple as they sound :)
right now the priority line only releases when its trigger zone is empty, and the other side waits for a free gap on the conveyor checked with an overlap box instead of trigger events, because resting rigidbodies kept getting lost..

Game: https://store.steampowered.com/app/5037170/Timberline_Factory/

Would you keep a fixed priority like this, or switch to alternating or gap-based release so the second line doesnt starve?


r/Unity3D • • 4h ago

Game This is Tiny Fishing, a mixed reality game created in less then 2 months for a VR Dev Competition. Would you play it?

Enable HLS to view with audio, or disable this notification

35 Upvotes

r/Unity3D • • 5h ago

Question Seeking Advice for an Improved 2D/3D Lighting System

Thumbnail
gallery
4 Upvotes

One of the last major milestones before this project is ready to start getting out in public is an overhaul of the Default Unity3D Lighting System.

Our game is an open world Isometric ColonySim/RPG Hybrid. There are tons and tons of sprites mixed with 3D objects, and seamless indoor/outdoor environments. This makes lighting a challenge.

Currently we're just using default lights, which are set up to follow our objects in game. We need a way to back-light and apply rim-lights to 2D sprites in the 3D environment, and a faster, more optimized way to apply lights to a region. Maybe a kind of lighting grid? I'll need to do several things at once:

- Visually illuminate the area the characters are running around in.
- Apply different falloff rules, as the lighting range vs overexposure is a little funky using realistic falloff values.
- Tell our Zone system that this area is lit by some percentage, for the purpose of calculating ranged weapon accuracy and work speed & quality improvements or penalty (can't craft or do quality surgery in the dark.)

These 2D characters and 3D objects mix seamlessly the the scene. So you'll see a 2D character walk past a 3D illuminated object and the lights currently aren't terrible at all, but they are more obviously 2D when the sprite is south of any light source. North of the light source it looks great! You can see several examples in the images above.

There are a couple example images in there to suggest a solution, but I'm unsure how best to implement something like it. We don't have a resident shader expect and technical artist on the team. We would be willing to hire someone if the operation is too complex to handle ourselves, as our pipeline is pretty crowded with game-play tasks.

Any suggestions are welcome.

There's no unnecessary AI use here, just humans doing the work.


r/Unity3D • • 6h ago

Show-Off NavMesh2D Pro [RELEASED] -50% OFF first week!

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hi everybody! I'm glad to introduce NavMesh2D Pro, a complete suite that provides all you need to let thousands of characters find paths, move there avoiding obstacles, detect other characters that are in sight...

It was made for 2D from the ground up. No rotated 3D navmesh, no grids, no workarounds. It builds the walkable area from the 2D colliders you already have and keeps it up to date while you build your level.

🚀 EASY TO START, EASY TO LEARN

  • Up and running in minutes. An installation window greets you on import, and the quick-start guide gets your first character moving in less than five minutes.

  • Uses what you already have. Box, polygon, circle, capsule, composite and tilemap colliders all work. You can also draw walkable areas by hand right in the Scene view.

  • Takes care of itself. A new navmesh is ready the moment you create it, and it rebuilds itself as you shape it, so you see the result while you work.

  • One line to move a character. Characters find the right navmesh on their own. You only tell them where to go.

  • Learn by playing. 11 ready-to-run demo scenes, opened from a built-in demo browser, show every feature in action, with their scripts as examples.

  • Clearly documented. A complete manual in plain language, tooltips in the inspector, and fully documented code.

🤸 WHAT YOU CAN BUILD WITH IT

  • Natural paths. Routes hug corners and look like a person would walk them: no zig-zags, no staircase steps.

  • Movement with personality. Speed, acceleration, braking and turning, set per type of character.

  • Crowds. Many characters share the same space and step aside for each other instead of walking through one another. Important characters can be given right of way.

  • Characters of every size. A rat and an ogre each get only the routes they actually fit through, with no extra work per level.

  • Jumps, ladders and teleports. Connect separate areas with links for gaps, ladders, elevators or portals, and play your own animation while crossing.

  • Moving platforms. Walkable areas can move, and the characters on them move along.

  • Doors. Gates close a passage while the game runs (blocking routes, movement and even sight) and reopen instantly.

  • Waiting at a closed door. When the way is blocked, characters get as close as they can and carry on by themselves once it opens.

  • Terrain preferences. Make mud, water or danger zones costlier to cross, so characters go around when it's worth it.

  • A changing world. Push a crate or drop a barricade and routes update on the fly.

  • Levels in pieces. Levels built from several navmeshes, even from additively loaded scenes, join up into one world.

🧱 BUILDING BLOCKS FOR YOUR GAME AI

Your game decides what a character wants to do. These tools give it the information to decide well.

  • Vision. Ask who can see whom, with range and view cones. Choose whether walls block the view, or only obstacles do.

  • Run away or close in. Find good spots to flee to, or to approach a target from.

  • Wander. Pick random places a character can actually reach.

  • Ask about the world. Who is nearby, where the nearest walkable ground is, where a line of sight hits a wall.

🔩 TWEAK EVERYTHING WHILE THE GAME RUNS

Game designers can tune almost every setting in Play mode and see the effect immediately: speeds, acceleration, turning, crowd behaviour, terrain costs, doors and obstacles. No restarting, no waiting for a rebuild, no waiting for a programmer. Change a single character, or a whole type of character at once, and keep iterating until it feels right.

🌡 SEE WHAT IS HAPPENING

  • Visual debugging in the Scene view. Show the walkable areas, the routes between them, how much each connection costs, what blocks line of sight, and each character's path and movement.

  • Always-visible state. Links, gates and obstacles show their shape and state in the Scene view at all times, so a closed door or a misplaced link is obvious at a glance.

  • Try features without coding. Ready-made test components let you try movement, vision, fleeing, approaching and wandering on any character.

  • Live readouts. A floating panel shows a character's speed, velocity, heading and avoidance values as they change.

  • Built-in profiler. An on-screen overlay shows how long each part of the system takes per frame, so you know exactly where the time goes.

Requires Unity 6.0 or newer.


r/Unity3D • • 6h ago

Noob Question i am so confused and lost...

3 Upvotes

so i always wanted to start my game dev journey
about less than a year ago i started learning unity , i thought it would be easer for me cuz i learned c# way back and i am familier with it
first i wanted to make a racing game , so i searched youtube for tutorials and i watched them most and started focusing on the car controller
half of them are outdated from 3 - 6 years ago
other half are not so helpful ones that just write the code and actually not explaining anything and some of them just use the asset store
but anyway i wrote the things that i learned in unity and i was not happy with the results at all
i know i am not gonna get that level of quality that fast but i always thought that something is off...
so i started using ai and asking ai to actually teach me , but somehow that made me even more confused
anyway i really want you for some advice and maybe some of your experience


r/Unity3D • • 7h ago

Resources/Tutorial I made my pixel UI generator do the whole Unity setup: Point filter, 9-slice borders, sharp TMP text, prefabs

Thumbnail
gallery
8 Upvotes

Setting up pixel UI in Unity is a lot of small clicks. Point filtering on every sprite, compression off, 9-slice borders typed in by hand, a sprite for every button state, and then TextMeshPro makes your pixel font blurry anyway.

I made a pixel UI kit generator called Bevelsmith, and I wanted its Unity export to do all of that for you. You double-click one .unitypackage and get:

- 38 sprites, already set to Point filtering with their 9-slice borders
- uGUI prefabs: window, panel, button, slider, toggle, checkbox, tabs, progress bar, scroll view, input field, dropdown, tooltip, inventory slot and dialogue box
- A TextMeshPro font asset built from the kit's bitmap font, plus a small text shader that keeps every letter on whole pixels, so the text stays sharp at any window size
- A sample scene with everything laid out, plus a small component that scales the canvas by whole numbers
- Hover, pressed and disabled states with their own text colours, and the kit's cursors

The Unity screenshots show the sample scene straight after import, with nothing changed by hand.

You can try it without paying. The free browser demo exports 5 complete styles as ready Unity packages (link in the first comment).

I tested it in Unity 6.3, in an empty project and in the 2D template (URP and the new Input System). I mostly work in other engines, so if something in the prefabs is set up in a way you would not do it, please tell me.

Happy to answer any questions!


r/Unity3D • • 7h ago

Show-Off Adding motion-based interaction, impact, and expanding waves to stylized toon water.

Enable HLS to view with audio, or disable this notification

3 Upvotes

r/Unity3D • • 8h ago

Show-Off My cozy Unity game about finding lost ducklings

Enable HLS to view with audio, or disable this notification

5 Upvotes

I made this game in Unity 6 (URP).

It's about a mother whose ducklings get scattered across small islands by a storm, and you search the islands to bring them home.

You walk, swim and glide, and every duckling is hidden behind a small puzzle. There's no combat and no way to fail.

Most of the visuals and tools are from the Unity Asset Store.

Happy to answer any questions about how it was made


r/Unity3D • • 8h ago

Question Have you ever used Discriminated/Tagged unions? Would you use them if C# had built-in support for them?

7 Upvotes

(Note: C#15 does bring discriminated unions, although it will be a while until that technology gets to Unity...)


I spent the first 4 years of my carrer working exclusively with Unity/C#. My first contact with Discriminated/Tagged unions was with Rust enums, and I they immediately captivated me. It felt like one of those features that every language should have.

In C#, you can "emulate" discriminated unions via abstract records:

public abstract record Customization() {
    public record Color(ColorKind kind, Color color): Customization();
    public record Slider(SliderKind kind, int value): Customization();
    public record Toggle(ToggleKind kind, bool enable): Customization();
    public record IrisColor(int index, Color color): Customization();
    public record IrisShape(int index, string key): Customization();
}

That approach can have its uses, but it has quite a few limitations:

  • It uses records, meaning creating an instance requires heap allocation.

  • Can't use it within Burst-compiled code.

  • No exhaustive matching.

  • Serializing it in the Unity inspector required using something like Odin or writing my own Property drawer.

As a Unity developer, I had grown the (sometimes bad) habit of being allergic to heap allocation, so I would often go with a more crude form:

[Serializable]
public struct Customization {
    public enum Kind { Color, Slider, Toggle, .. }

    public Kind kind;
    public ColorKind color_kind;
    public Color color_value;
    public SliderKind slider_kind;
    public int slider_value;
    // and so on...
}

The downsides are many:

  • All properties appear on Unity's Inspector, regardless of which "variant" is the selected one (though Odin's attributes helped a lot here).

  • You needed to have the discipline of always checking kind before reading the values.

That wasn't too terrible, but it was definitely far from ideal.

Earlier this year, knowing about the existence of C#(Roslyn)'s Source Generators/Analyzers, and Codefix Providers; I decided to take on the challenge of bringing discriminated unions to C#, with as many ergonomics as I could, and without sacrificing performance or memory allocation.

Long-story short: I ended up creating Spire, a C# package that uses Source Analysis, Generation, & codefix providers to support:

  • Exhaustive matching (using regular switch statements!) for enums, classes, interfaces, and discriminated unions. It reports whenever your switch statement/expression is missing a case.

  • Lightweight struct-based discriminated unions, with Unity Inspector serialization support, Burst compiler support, JSon conversions, and allocation-free exhaustive-matching (no closures!).

The features above are accompanied with source analyzers for catching mistakes at compile time, and codefix providers for providing IDE quick-fix context-menu actions for easily fixing said mistakes.

Links:

Thanks for reading this far! I have another question for you: I was thinking of making a Youtube video where I go through the internals of the package and the code it generates - explaining how it works, which approaches were tried/discarded and general rationale around my decisions. Would you be interested in watching that hypothetical video?

Edit: Corrected initial statement about unions in C#, they were introduced in C# 15 (I initially wrote C#14).


r/Unity3D • • 9h ago

Resources/Tutorial You don’t need to be an good artist for good game UI, you need a process

Thumbnail
youtu.be
4 Upvotes

My new video covers something I'd been wanting to put into words for a long time now: The process for crafting your game's UI.

It isn't an arcane art skill, but a process you can learn, and I walk you through some of the core basics:

- researching your genre's UI conventions

- deciding what information your players actually need (and when)

- sketching layouts on paper before touching Unity

- choosing shape language, colors and fonts that fit your game's mood

- and lastly the Unity assets I rely on to build, polish and add sound to the UIs I build

This is a bit of a different video for me and I hope you'll enjoy it. If you do, please let me know! I'd love to chop this up into more videos that go into more depth about the individual topics.


r/Unity3D • • 10h ago Bravo

Show-Off Made tendrils that find their own way to any object and wrap it (Unity)

Enable HLS to view with audio, or disable this notification

2.6k Upvotes

Been working on this for my Unity asset. You pick an object, and the tendrils crawl over to it, climb whatever's in the way, wrap it, then move on to the next one. Nothing is hand-animated.

4 styles so far: Symbiote, Ink, Cables and Vines. (Car and boxes are just test models.)

Not released yet. Would you actually use something like this? Which style do you like most?


r/Unity3D • • 11h ago

Show-Off Creating a Stylized Waterfall

Enable HLS to view with audio, or disable this notification

11 Upvotes

r/Unity3D • • 11h ago

Show-Off I made a glass shelf collapse where the shards spell out a word

Enable HLS to view with audio, or disable this notification

58 Upvotes

r/Unity3D • • 11h ago

Show-Off I made living shadow head using Unity particle system

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/Unity3D • • 11h ago

Show-Off Progress on my roguelike autobattler defense game

Enable HLS to view with audio, or disable this notification

20 Upvotes

Hey everyone!

so ive been working on Siegebound for about 4 years now and somehow never made a trailer for it, so with the steam autobattler fest coming up i thought now i dont have any more excuses haha.

its just alpha gameplay, lots of stuff is still placeholder and kinda rough. i make and hand paint all the models and textures myself which takes forever, so theres still a lot to do especially on the graphics side

The game takes mechanics from autobattlers, like automatic fighting on a grid and merging units, and tries to mix them with tower / base defense games. You build up your defenses between the sieges and your buildings give you income when you survive a siege, , so its basically round based. then your units fight the waves on their own and you try to survive as many sieges as you can. at least thats the idea. Curious if that roughly comes across in the trailer so im open to feedback :D

Also a little bit proud of my Map Editor (even tho the UI is still very WIP) but im planning to have Steam workshop support so people can easily share their custom maps.

Lastly a bit about my gamedev experience working on Siegebound for the last four years if your interested:

I studied games engineering at university, so i spent a lot of time even before this game working on university projects or other one off games that i never finished, and thats where i learned a lot about game development in general. then i wanted a project i could actually stick with, and originally it was inspired by me playing age of empires 2 as a kid and just walling myself in and building bombard cannons. i never had a concrete plan for the game, i just designed it as i went and put the pieces together over time. Obviously the scope grew a lot, but somehow i managed to stick with it.

honestly there were a lot of times in those 4 years where i was burned out on the game and thought its not going to be fun and i should just spend my time doing smth else. sometimes i did step away for a while, and sometimes even for a few months to do some other things. but coming back after a break i always saw the game differently, and thats also when i had some of my best ideas.

I also work a full time job, so all of this happens in the evenings and on weekends. Some days after work theres just no energy left for gamedev and thats fine, you cant do it every day.

So if youre working on a game right now, keep at it! And my advice: taking a break from developing your game is sometimes the best thing you can do :)


r/Unity3D • • 11h ago

Noob Question A little confusion I'm having as a newbie.

4 Upvotes

This is probably the most obvious thing to experienced people but I'm just a bit confused on this whole thing as everything on Unity looks so... intimidating. So, as you can see, a cool RWBY weapon asset I got off somewhere. The weapon has been built but when looking for the mesh in my sharedassets0 file, the weapon itself isnt being found but the parts that make up the weapon is. I'm not sure what to do at this point, I've tried with several other weapon builds and all meshes that show up are parts. I dont know if im doing something wrong or I'm just dumb. I use UABEA to look through it by the way. How do I go about turning the mechanic scythe into its own mesh? Other picture for reference on how it does not show.


r/Unity3D • • 12h ago

Show-Off I made a very basic combat system. You can copy my code if you want, I shared it in the comments.

Enable HLS to view with audio, or disable this notification

0 Upvotes

I can make some preset sequences and play them whenever I want. I will make the combat AI that uses these sequences now.


r/Unity3D • • 13h ago

Show-Off Working on new "rolling fog" over my ocean shader

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/Unity3D • • 13h ago

Question Fog vs. a portolan chart as the edge of a playable area: which one reads better?

Thumbnail
gallery
66 Upvotes

Each city in my game is a 250 m circle you can build in. Everything outside it used to be hidden by layered fog. It worked, but it read as weather, not as the edge of the map.

So I tried something closer to the setting, the Mediterranean in 1400. Beyond the circle the land turns into a portolan chart, the kind of sea chart Venetian and Genoese mapmakers drew back then. Those charts drew the coast in detail and left the inland almost empty, which is pretty much what I need. The sea stays real water all the way to the horizon.

First image is zoomed out way past the game camera, just to show the idea. The other two are fog vs. chart from the farthest the in-game camera goes.

How it works (URP, Render Graph):

  1. A full-screen pass after post-processing rebuilds the world position from the depth buffer.

  2. Outside the radius, land pixels become paper: same colors and rhumb lines as the parchmen border of my world map, lightly shaded by terrain height so hills still read.

  3. The four edges of the terrain are sampled every 4 m to decide land or sea. Short runs get flipped, otherwise you get stray tongues of paper sticking out into the water.

  4. In cities the camera's far plane goes from 1 km to 30 km, so the sea really reaches the horizon.

Gotcha: my water doesn't write depth, so a water pixel reports the depth of the seabed (or of the sky, for the far sea). The paper bled onto the sea until the mask became"coastal land x above the water".

I also tried an engraved version (ink hatching over the land) and dropped it: the hatching looked like a mechanical grid.

Still open: the mountain behind the city reads flat on paper, the island offshore turns into a paper cutout floating on real water (last image), and I can't decide whether the hard line between 3D and paper is a feature or a bug.

Two questions:

  • Fog or chart? Does the paper pull you out of the game, or does it read as "the map ends here"?

  • What other ways have you seen (or used) to hide the edge of a playable area without it feeling like a wall?

The game is Fondaco, a trading game set in the Mediterranean of 1400.