r/Unity3D • • 12m ago

Show-Off Souls-like boss fight I built from scratch in Unity 6: data-driven moves, behaviour tree + utility AI, and a boss that delays its swings (open source)

3 Upvotes

A hobby project to learn how Souls-like combat actually works under the hood. Some things I found interesting:

Action windows run on a clock, not animation events. Every move is an ActionData asset with time windows: hitbox, i-frames, parry, riposte, cancel windows. Since they're read from the action's own timer, an interrupted or blended-out clip can never leave a hitbox or i-frames stuck on.

Hits are swept. Each point on the blade sphere-casts from its last position, so fast swings can't skip a target between frames.

Behaviour tree decides what to do, utility scoring picks the attack. Range, angle, cooldown, phase and repetition get scored, then it picks randomly from the top few. Turtle behind your shield too long and you get a guard break.

Delayed swings. The boss can hold a wind-up while tracking you, so rolling on rhythm isn't enough. The chance goes from 20% to 60% as the fight goes on.

The VFX are 8 hand-written URP shaders. Note: the video uses Mixamo characters, which can't be redistributed, so the repo ships with CC0 stand-ins.

Happy to go into detail on any of it!

GitHub (MIT): https://github.com/berkencami/souls-like-boss-fight


r/Unity3D • • 48m ago

Game I'm making a game like Splinter Cell with co-op

0 Upvotes

r/Unity3D • • 1h ago

Question Unity Physics engine not ready when scene loads?

2 Upvotes

I have a main menu and then a scene that is loaded when the game starts. Every actor in the scene has a Physics.RaycastAll that detects nearby colliders with a certain tag on Start

I'd never had an issue when the scene was standalone, however now that I am using scene load async (single, not additive) it seems that the physics engine is not awake in order to find the raycast hits, because I debugged all the way down to the actual cast call to ensure that was what was missing;

The actors exist, the external colliders being tagged exist with their correct tags, there is no mistiming from awake/on enable/start functions across the project

However, my raycast makes no hits. I can only assume this is because the physics engine isn't awake when the scene is loaded this way, but considering these functions are being called all the way to Start, it seems unless there is a more straightforward workaround I need to either do a weird collider shake during an awake function, or I need to somehow await async for the next physics update

Anyone know how best to handle this?


r/Unity3D • • 7h ago

Question First person camera is not working

0 Upvotes

Hello! I followed the tutorial of someone named "Shark Games" how to do make first person movement in unity. I tried to follow step by step that tutorial including a fix that they suggested on the comments box; everything worked with the exception of my camera movement. Whenever I try to move my mouse to move the camera, nothing happens.

Link of the tutorial that I was following:

https://www.youtube.com/watch?v=v_ncMFEoHTg

Here is how my code looks like:

using UnityEngine;
using UnityEngine.InputSystem;


[RequireComponent(typeof(CharacterController))]


public class PlayerController : MonoBehaviour
{
    [SerializeField] private float WalkSpeed = 5.5f;
    [SerializeField] private float RunningSpeed = 9.0f;


    [SerializeField] private float JumpForce = 8.0f;
    [SerializeField] private float Gravity = 20.0f;


    [SerializeField] private float LookSensitivity = 0.2f;
    [SerializeField] private float LookAngleLimit = 90f;


    private Camera mainCamera;
    private CharacterController characterController;


    private InputAction moveInput;
    private InputAction runInput;
    private InputAction jumpInput;
    private bool jumped = false;


    private float currentMoveSpeed = 0.0f;
    private Vector3 moveDirection = Vector3.zero;
    private float lookAngle = 0.0f;


    void Start()
    {
        mainCamera = GetComponentInChildren<Camera>();
        characterController = GetComponent<CharacterController>();


        moveInput = InputSystem.actions.FindAction("Move");
        runInput = InputSystem.actions.FindAction("Sprint");


        jumpInput = InputSystem.actions.FindAction("Jump");
        jumpInput.started += Jumped;


        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible = false;


        currentMoveSpeed = WalkSpeed;
    }


   
    void Update()
    {
        Vector2 moveVector = moveInput.ReadValue<Vector2>();
        Vector2 mouseDelta = Mouse.current.delta.ReadValue();


        if (!characterController.isGrounded)
            jumped = false;


        HandleMovement(moveVector);
    }


    private void HandleMovement(Vector2 moveVector)
    {
        Vector3 forward = transform.TransformDirection(Vector3.forward);
        Vector3 right = transform.TransformDirection(Vector3.right);


        float oldY = moveDirection.y;


        Vector2 newSpeed = new Vector2(moveVector.y * currentMoveSpeed, moveVector.x * currentMoveSpeed);


        moveDirection = (forward * newSpeed.x) + (right * newSpeed.y);
        moveDirection.y = (jumped && characterController.isGrounded) ? JumpForce : oldY;


        if (!characterController.isGrounded)
            moveDirection.y -= Gravity * Time.deltaTime;


        currentMoveSpeed = runInput.IsPressed() ? RunningSpeed : WalkSpeed;
        characterController.Move(moveDirection * Time.deltaTime);
    }


    private void Jumped(InputAction.CallbackContext _)
    {
        jumped = true;
    }


    private void HandleLooking(Vector2 mouseDelta)
    {
        lookAngle += -mouseDelta.y * LookSensitivity;
        lookAngle = Mathf.Clamp(lookAngle, -LookAngleLimit, LookAngleLimit);


        mainCamera.transform.localRotation = Quaternion.Euler(lookAngle, 0, 0);
        transform.rotation *= Quaternion.Euler(0, mouseDelta.x * LookSensitivity, 0);
    }
}

r/Unity3D • • 10h ago

Show-Off MeshBrush – Paint on Skinned Meshes

7 Upvotes

r/Unity3D • • 11h ago

Question How to achieve a thick, viscous liquid pouring effect in Unity?

6 Upvotes

I'm trying to recreate the effect shown in this video:

https://www.youtube.com/watch?v=DrUGRGKRmnw

When the liquid is poured from a container, I'd like it to flow like a thick, viscous liquid and gradually pile up in layers before spreading out as it hits the surface, just like in the video.

I tried using Obi Fluid asset, but I couldn't achieve the desired effect, and the performance cost was quite significant. I've looked around for tutorials and resources, but I haven't been able to find useful information.

So I thought I'd ask here in case anyone knows how to achieve this kind of effect.

Would I need to use VFX Graph for this, or is there another approach?

I'd really appreciate any advice or suggestions!


r/Unity3D • • 12h ago

Game Samurai Soulslike (WIP) Dev Log 3

11 Upvotes

It's been a while since the last time I made a post. It is my first time trying to make a soulslike game and I wanted to try making it as I absolutely love soulslike genre. It's been a couple of tough months and I had to learn a lot of stuffs but I am making progress slowly but surely.

I have added a couple of enemy variations, two more bosses and some more VFX. Some UI and main menu. Mana bar and player spells. Enemies now have normal attacks that can be dodged and parried, as well as attacks that can only be parried (Yellow attacks) or dodged (Red attacks).

I welcome any feedbacks and suggestions, Thanks.


r/Unity3D • • 12h ago

Show-Off Picked this project back up after some time away and made the grass flammable. It is very satisfying to watch 👀

10 Upvotes

r/Unity3D • • 12h ago

Question Hair Card Materials to URP

Thumbnail
gallery
5 Upvotes

Would anyone who has experience with hair-card based textures/materials have any suggestions for transferring materials to Unity URP from Blender. The first image is the hair as it is set up in Blender and the second is Unity. I believe the issue is with UV mapping, as mapping is shifted in the actual material setting in Blender to align with the actual strand in the hair card texture. Any ideas how to do something similar in Unity with this method of hair card mapping? I have tried messing with the offset and tiling which improved it slightly from image 2 but still far from the correct display. Any help is appreciated!


r/Unity3D • • 14h ago

Question So much 3D AI crap on the Asset Store

56 Upvotes

Most of the new 3D assets are AI (labeled or not). You gotta be very patient to explore all the new assets in hopes to find something good on the new releases. I force myself to do it in case a gem drops but it's getting more and more flooded with crap. Seriously still no AI filter?


r/Unity3D • • 15h ago

Question HELP how do i make a physics gun like in garry's mod with unity 4.6

0 Upvotes

Help


r/Unity3D • • 15h ago

Resources/Tutorial Free Unity/Shader Tutorials

Post image
39 Upvotes

My website is now live! It is designed to be a hub for learning about various processes in Unity, namely rendering & shaders. I have a few tutorials already live and plan to add more as I keep going. The topics will vary in complexity, if there is something you would like to learn about please leave a comment!

This is also going to be the main source of information for my free technical art pipeline B2U Material Master. I greatly appreciate anyone who checks it out!

https://dnart.ca


r/Unity3D • • 17h ago

Show-Off Dynamic motion synthesis ragdoll

169 Upvotes

r/Unity3D • • 20h ago

Game Rocket League in Unity

Thumbnail
youtube.com
0 Upvotes

A personal project I've been working on just to have fun tinkering with new things I can do with rocket league physics, it has been made in a similar way to other rocket league like games that have come recently, using the RocketSim library made by ZealanL, oh btw this is made in unity and I've used AI a bit for speeding up coding but I am a game developer so its not fully vibecoded.
If you have some suggestions for cool features then please tell me, thanks!


r/Unity3D • • 23h ago

Question Can someone explains for me what each term mean and how to optimize ?

Post image
45 Upvotes

I want to learn about these to optimize the games better besides when it came to optimization for mobiles what is the difference between mobile and pc ? Ik there are stuff in common but at some point for mobile there is an extra work what it is ?


r/Unity3D • • 23h ago

Show-Off My friend secretly made a physics-based horse in our game and revealed it to me

232 Upvotes

So we're building this co-op action roguelike called Crown & Collision where EVERYTHING is physics based. Movement, combat etc.

We had talked about how cool it'd be to have a mount in the game but then it kinda got forgotten about. Until one day my friend invited me to check out the new feature he had just made.


r/Unity3D • • 1d ago

Question I want some help about my VAT optimisation

4 Upvotes

Hello everyone,

I'm trying to build a Vertex Animation Texture (VAT) pipeline to export animated characters from Blender 5.2.2 into Unity URP.

My goal is to use VAT animations for a large number of soldiers in an RTS game. I want to bake character animations in Blender and play them in Unity through a custom shader, without using skeletal animation at runtime.

However, I'm facing a problem that I haven't been able to solve despite spending quite a lot of time debugging the pipeline. The character appears fragmented, with vertices seemingly being displaced to incorrect positions.

I'd appreciate help from anyone experienced with VAT workflows, Blender-to-Unity pipelines, or custom vertex shaders.

1. Software and setup

  • Blender 5.2.2
  • Unity with URP
  • FBX character imported from Meshy
  • Custom HLSL VAT shader
  • EXR position texture
  • Character mesh: 701 vertices
  • Animation: IDLE
  • Frame count: 340
  • FPS: 30
  • VAT texture resolution: 1024 × 340

The Blender scene contains:

  • Mesh object: char1
  • Armature object: Armature

2. Blender VAT preparation

I created a UV layer called VAT_Index to store the original vertex index for each vertex.

The UV U coordinate is generated using:

u = (vertex_index + 0.5) / 1024
v = 0.5

The UV values are assigned per mesh loop using the corresponding vertex index.

I also ran a validation script in Blender.

The results were:

  • Vertex count: 701
  • Loop count: 1497
  • UV entries: 1497
  • Incorrect indices: 0

The validation confirmed that all VAT indices were generated correctly.

3. Animation export

I exported the evaluated mesh positions frame by frame into an EXR texture.

Each pixel stores:

  • R = X position
  • G = Y position
  • B = Z position
  • A = 1

The texture dimensions are 1024 × 340.

I also exported the first frame to a CSV file containing the vertex index and XYZ coordinates.

To verify the export, I compared the CSV coordinates against the corresponding EXR pixels in Blender.

The results were:

  • Average error: approximately 0.0000108
  • Maximum error: approximately 0.0000460

This suggests that the Blender-side EXR export is working correctly, at least for the tested frame.

4. Unity mesh and UV validation

I imported the FBX into Unity.

The imported mesh has:

  • 701 vertices
  • UV0 count: 701
  • UV1 count: 701

The VAT index data is available in Unity through mesh.uv2 (TEXCOORD1).

I wrote a C# validation script to check whether every Unity vertex maps to a unique source vertex index.

The results:

Mesh Vertex Count: 701
VAT UV Count: 701
Unique indices: 701
Missing indices: 0
Duplicate indices: 0
Invalid indices: 0

SUCCESS: VAT UV indices match.

For example:

Unity Vertex 0 -> EXR Vertex 7
Unity Vertex 1 -> EXR Vertex 2
Unity Vertex 2 -> EXR Vertex 81
Unity Vertex 3 -> EXR Vertex 13
Unity Vertex 4 -> EXR Vertex 26

So the UV index channel appears to be intact after FBX import.

5. The actual problem: EXR pixel values in Unity

I then wrote a Unity C# script to compare the EXR texture values against the Blender CSV data.

The script:

  1. Reads the VAT index from Unity's UV2 channel.
  2. Uses that index to access the corresponding EXR pixel.
  3. Reads the CSV coordinate for the same source vertex.
  4. Calculates the distance between the two positions.

Initially, the raw Unity pixel values were significantly different from the CSV values.

For example:

Unity Vertex 0
Source Index: 7

CSV:
(0.47, 0.31, 0.23)

EXR read in Unity:
(0.71, 0.59, 0.51)

I suspected a color-space/gamma issue.

I tried applying:

Mathf.GammaToLinearSpace()

to the EXR RGB values before comparing them.

This improved some values considerably, but it did not solve the problem.

Here are some results after applying the gamma conversion:

Source IndexCSV PositionUnity EXR CorrectedError
7(0.47, 0.31, 0.23)(0.47, 0.31, 0.23)0.00018
135(0.12, 0.47, 0.23)(0.00, 0.47, 0.00)0.2552
145(0.27, 0.36, 0.39)(0.21, 0.44, 0.09)0.3064
132(0.19, 0.37, 0.36)(0.01, 0.38, 0.02)0.3865

Across all 701 vertices:

Compared vertices: 701
Average error: 0.08018545
Maximum error: 0.46220990

The last animation row also produced almost identical error statistics when compared against the first-frame CSV. I understand that this is not a valid frame-to-frame comparison, but I checked it while investigating texture row orientation.

6. Unity texture import settings

My EXR import settings currently include:

  • Texture Type: Default
  • Read/Write: Enabled
  • Non-Power of 2: ToNearest
  • Filter Mode: Point
  • Compression: None
  • Generate Mip Maps: Disabled

I could not find an sRGB checkbox in this EXR import inspector.

I also checked the FBX model import settings:

  • Scale Factor: 1
  • Convert Units: Enabled
  • Bake Axis Conversion: Disabled
  • Weld Vertices: Enabled
  • Optimize Mesh: Everything
  • Mesh Compression: Off
  • Read/Write: Enabled

I have not conclusively established whether these model import settings are contributing to the problem.

7. Shader implementation

I'm using a custom URP HLSL shader.

The shader reads the VAT texture using the vertex's VAT UV coordinate and the selected animation frame.

The basic sampling logic is:

float textureV = (_Frame + 0.5) / _FrameCount;

float3 vertexPosition = SAMPLE_TEXTURE2D_LOD(
    _VATPosition,
    sampler_VATPosition,
    float2(input.vatUV.x, textureV),
    0
).xyz;

output.positionHCS = TransformObjectToHClip(vertexPosition);

I also experimented with Blender-to-Unity axis conversion and a 0.01 scale multiplier, but scaling the model only made it smaller. It did not fix the fragmented geometry.

At this point, I would really appreciate help identifying the actual cause rather than trying random import settings.

My main questions are:

  1. Why would Unity's EXR pixel values differ from the original Blender coordinates even though the EXR and CSV were verified against each other in Blender?
  2. Could Unity's EXR importer be changing the pixel data, especially for floating-point position textures containing negative values and values greater than 1?
  3. Is Texture2D.GetPixel() returning values that have undergone a color-space conversion or another transformation?
  4. Could FBX mesh optimization, vertex welding, or vertex reordering cause this issue even though the VAT UV indices are all unique and valid?
  5. Is there a reliable way to preserve exact floating-point position data from Blender to Unity?
  6. Would using a RAW binary Float32 texture instead of EXR be a better solution?
  7. Is there anything fundamentally wrong with my VAT texture addressing or vertex-index workflow?

I am open to changing the export pipeline completely if necessary. I don't necessarily need to keep using EXR.


r/Unity3D • • 1d ago

Show-Off I've been working on a visual dialogue system for Unity – here's the result

6 Upvotes

One thing I've always found interesting about Unity development is how different developers approach dialogue implementation.

For projects involving branching conversations, NPC interactions, and narrative progression, managing dialogue can become a substantial part of development.

I recently released Dialogue System Pro, a tool designed to make this workflow more visual and manageable.

Rather than building an entire dialogue framework from scratch, developers can use a dedicated system for creating and managing their dialogue experiences.

I'm interested in hearing from other Unity developers:

  • What do you currently use for dialogue implementation?
  • Do you prefer custom-built systems or dedicated dialogue tools?
  • What's one feature you consider essential in a dialogue system?

Would genuinely appreciate technical feedback and suggestions.


r/Unity3D • • 1d ago

Show-Off Been working on HorrorNeighborhood in Unity and wanted to share a few shots

Thumbnail
gallery
21 Upvotes

If possible take a look at all the screenshots i posted and let me know what you think in the comments 👆🏼👆🏼👆🏼👆🏼👆🏼👆🏼👆🏼👆🏼

guys iv been spending some time and still working on HorrorNeighborhood and thought Id share a few screenshots of the project here

Trying to get that creepy neighborhood atmosphere right and make everything feel a little unsettling

Still working on it but Id love to hear what you think


r/Unity3D • • 1d ago

Question Strange shadows on mesh when imported to Unity

Thumbnail
gallery
85 Upvotes

I have a thin mesh that has strangely behaving shadows when imported to Unity URP 6.3, but looks fine in Blender. I thought it was ambient occlusion, but I turned it off, and it looks the same. I tried playing around with the depth and normal bias in render pipeline asset, with no improvement either. If anyone has encountered the same with a solution, I'd be more than grateful to hear, thanks!


r/Unity3D • • 1d ago

Question Can we no longer access the Linux versions of Unity 5.x through the forum?

Thumbnail discussions.unity.com
1 Upvotes

r/Unity3D • • 1d ago

Show-Off The current state of my project. I am curious what you think

28 Upvotes

r/Unity3D • • 1d ago

Resources/Tutorial I made an open source Unity package for Flagsmith (feature flags and A/B tests). The browser demo is running a real A/B test and I need players

1 Upvotes

Flagsmith is an open source feature flag service, and it has no Unity SDK. Its .NET SDK uses timers and threads that don't run in WebGL builds. So I wrote a Unity package for it for a hackathon: flags, live tuning, a kill switch and A/B tests, WebGL included.

The demo is a small runner. You can flip flags on the page and watch the running game change: the skin, the speed, a winter event that reskins the level.

It's also running a real A/B test right now. Half of you get a text hint before your first run and half get a tap hint, and Flagsmith counts who reaches 100 m on the first try. I'll post the numbers here whatever they are. The only data it sends is a random anonymous id and that one result.

Play (about a minute, works on a phone): https://harindulk.github.io/flagsmith-unity/

Code : https://github.com/Harindulk/flagsmith-unity

Feedback on the package is welcome, especially from anyone using remote config in a shipped game.


r/Unity3D • • 1d ago

Question How to control speed over time ?

Post image
246 Upvotes

For example I want after 1 min the speed is 15 and then lock this value for 5 minutes then after that increase till 20 and so on
how to make this possible ?


r/Unity3D • • 1d ago

Show-Off I made loot boxes a shared multiplayer experience in my game (and removed the toxic part)

0 Upvotes

Every time you level up, you get a free loot box (no paid loot boxes, no microtransactions, no Season Pass). Rewards are purely cosmetic and have no impact on gameplay.

Crates are opened directly in 3D in the game, synchronized via NetCode, so other players can watch the opening and see what you get, making it a fun shared moment between friends. On your view, you have a custom animation, but everything is synched in real time.

What do you think?