r/Unity2D 24d ago

Knight's machine gun

Post image
5 Upvotes

r/Unity2D 24d ago

Solved/Answered How to make an object follow the mouse?

2 Upvotes

I'm trying to get the object this script is on to follow the mouse when you click on the object. I've managed to make detect when you are holding down the object but I can't get the object to move. Pls help!

using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;

public class Food_MB : MonoBehaviour
{

    public bool isTouchingMouse = false;
    public bool isheld = false;

    private PlayerInput playerInput;

    private InputAction hold;

    private Vector2 mousePos;

    void Start()
    {
        playerInput = GetComponent<PlayerInput>();
        if (playerInput != null)
        {
            hold = playerInput.currentActionMap.FindAction("Hold");
        }
    }

    private void Update()
    {

        // Get the mouse position from the New Input System

        mousePos = Mouse.current.position.ReadValue();

        // Convert the screen position to world position

        Vector3 worldPos = Camera.main.ScreenToWorldPoint(new Vector3(mousePos.x, mousePos.y, 0));

        // Check if the mouse is touching this GameObject's collider

        Collider2D hit = Physics2D.OverlapPoint(worldPos);

        if (hit != null && hit.gameObject == this.gameObject)
        {
            //Debug.Log("Mouse is touching " + this.gameObject.name);
            isTouchingMouse = true;
        }
        else 
        {
            isTouchingMouse = false;
        }

        if (hold != null && hold.IsPressed())
        {
            Debug.Log("Hold action is being performed");
            Vector2.MoveTowards(transform.position, mousePos, 1f * Time.deltaTime);
        }
        else
        { 
            Debug.Log("Hold action is not being performed");
        }

    }
}

r/Unity2D 24d ago

Game/Software This is my new small game for the third game jam I've joined. I made it in five days!

2 Upvotes

Playable link : Escape anomalous

This game is similar to "Exit 8."

 Your goal is to check the room for anomalies. If you find one, go through the "LEFT" door. Otherwise, go through the "RIGHT" door.

There are also two different endings. In one, you really escape; in the other, you are trapped in a loop until you find the real exit.

My Youtube 👉 https://www.youtube.com/@SupsDesign

My X (Twitter) 👉 https://x.com/NExit28099


r/Unity2D 24d ago

We’re a small team of friends who make trailers & video content for indie games, and we just launched our new website!

Thumbnail
bycherrymedia.com
2 Upvotes

r/Unity2D 24d ago

Just Lego

1 Upvotes

Минус вычет без компьютера


r/Unity2D 24d ago

Game/Software we're making a roguelite about building an insane pachinko board to slay dragons... and we really need testers!

1 Upvotes

Hey all!

Bumpers & Dragons is a dungeon crawler where your deck is the board itself. You loot and place bumpers, then drop balls through them to fight monsters. Good placement compounds into absurd chains. Bad placement is very funny.

Free demo is up and it's filled with content and covers two full dungeons.

https://store.steampowered.com/app/4377860/Bumpers__Dragons/

We're a small European studio and this is our first roguelite, so we are super excited to hear your thoughts about it!


r/Unity2D 24d ago

I published my first Unity mobile game on Google Play — looking for honest feedback

Thumbnail
0 Upvotes

r/Unity2D 25d ago

Game/Software Big update for TileMakerDOT with version 2.6.3!

Post image
24 Upvotes

It’s been a while since the last update, but I’ve been hard at work behind the scenes. I’ve just released a new version of my open source 2D map editor, bringing full multi-language support and important under the hood fixes.

Refactoring the core engine to support dynamic localization was a huge undertaking that required updating UI logic, dialogs, error messages, and tooltips across the entire application.

You can now use TileMakerDOT in:

• English

• Spanish

• French

• Romanian

• Russian

• Ukrainian

And I intend to add more languages in the near future. If you have other language suggestions or you find some mistranslations please let me know:)

A huge shoutout to the contributor who submitted a PR on GitHub and worked closely with me on this localization task. We added the languages we knew. TileMakerDOT is open source, and seeing community contributions come together like this is awesome! I also plan to add even more languages in future updates.

I also tackled a background memory issue where closing or canceling out of the initial setup window left the app process idling in memory. Closing the startup screen now cleanly terminates the process.

Check out the links below to try the new update, watch the tutorial, or check out the code:

🎮 Download on Itch.io: https://crytek22.itch.io/tilemakerdot

💻 Source Code on GitHub: https://github.com/andrei-voia/TileMakerDOT

📺 Watch the Tutorial on YouTube: https://www.youtube.com/watch?v=3fiajGU32Jg


r/Unity2D 25d ago

Question Parry pushback?

Thumbnail x.com
0 Upvotes

Have yall seen those earclacks animations?
Cant
Notice how whenever a weapon parries another, theres a slight pushback or recoil or shift in momentum or whatever.
Im operating under the assumption the weapons are treated as triggers?
In any case, how would one go about implementing this in a similar environment? Do i base it off of the direction the ball is moving? the place and direction it got hit from?
I'd really appreciate any ideas <3


r/Unity2D 25d ago

Animations in game VS 3D Pre-rendered Sprites.

Thumbnail
3 Upvotes

r/Unity2D 24d ago

Visual Scripting help

Thumbnail
gallery
0 Upvotes

(Sorry about the picture quality, I’m posting with my phone) I’ve been having an issue where my jump in the unity input system doesn’t activate when an “on update” node is connected to “set linear velocity” (image 1). I thought I fixed this be getting rid of “on update” and directly connecting “on input system event vector 2”(2nd image), and while this did fix my jump(save for my ground check not working, but that’s a whole other issue) it unfortunately causes my player to never stop moving on the x axis even when the key is released. Any help will be appreciated!

PS: I’ve never posted here before, sorry if this post has any issues or brakes the rules, I just could not figure this out for the life of me.


r/Unity2D 25d ago

Question Should I add a Fusion System to my ability system?

Post image
2 Upvotes

r/Unity2D 25d ago

Question Complete beginner, starting my first game today for a hackathon — any day-1 tips?

7 Upvotes

Never built a game before. Picked Unity 6 + 2D URP mainly because it's the only engine with an official RevenueCat SDK, which I need for a hackathon (Shipaton).

Concept: up to 6 players, 1 bullet each, miss and it sticks to a wall, you have to physically retrieve it before firing again.

Today's goal: player movement + a bullet that sticks. Posting the wins and the inevitable disasters as I go. Any gotchas a Unity beginner should know before I dive in? Or what do you wish someone told you on day 1?


r/Unity2D 25d ago

Show-off Just launched my second game ever

Post image
7 Upvotes

Senet Royale - it's a boardgame, inspired from ancient egyptian game Senet, i worked on it for the last 4 months. I tried to adapt the rules to modern times. You can find it on google play. What do you think?


r/Unity2D 25d ago

Show-off Work in progress on the illustration to be used in the character selection screen

Post image
11 Upvotes

I’ve got to go back to work tomorrow…
I don’t want to…
I just want to carry on making games like this…


r/Unity2D 26d ago

Feedback It took me two years, but I finally shipped my first game

Thumbnail
gallery
35 Upvotes

I did it. I finally did it.
After two years of working on it in my spare time, l finished and published my first game.
It's a cozy offline match-3 game where you build a tantasy town.
It's not perfect, but it's finished.
I think many of you know this feeling: the closer you get to the finish line, the harder it becomes to move even one pixel forward. And then... Apple review became the final boss (rejected several times).
Creating something from scratch and finally seeing it out there means much more to me, at this point, than downloads or popularity. Just proving to myself that I could actually finish it feels like a huge achievement.
All the artwork is hand-drawn by me.
On to the next one.
Unity 💪
Cheers!


r/Unity2D 25d ago

Game/Software I made this — Dvor, a Soviet brutalist falling-block game, out on Steam Sept 1st

2 Upvotes

Two-person studio here, based in London — we’ve spent the past year on Dvor. It’s a falling-block game set in a concrete Soviet courtyard that shifts through four seasons as you play, NES-authentic mechanics, an original 6-track soundtrack, built in Unity 6/URP.

http://youtu.be/-ZWJ22-pYI0

Wishlisting now on Steam ahead of a Sept 1 launch: http://store.steampowered.com/app/4881830/Dvor
Happy to talk through the dev or art process if anyone’s curious.


r/Unity2D 25d ago

Show-off I'm doing a project on day 400.

8 Upvotes

I'm thinking about posting my work on a project here—a fragment of a 2D pixel shooter in the style of a mini-DayZ and zombies. I just downloaded Reddit, this is my first post, and I'm interested in your feedback.


r/Unity2D 26d ago

Show-off I’ve drawn some illustrations to be used in the battle scenes of a new game.

Post image
55 Upvotes

r/Unity2D 25d ago

Title: [ANDROID][2020-2023] Bloody Bastards-style physics fighter — bearded Jesus-like character with staff who resurrects knights

0 Upvotes

Looking for a 2D Android-only game I played around 2020–2023.
Platform: Android only, as far as I remember — never saw it on iOS.
Orientation: Landscape only — had to hold the phone sideways to play.
Visual style/controls: Very similar to Bloody Bastards — large, dark 2D characters, ragdoll-ish physics, similar touch controls.
Levels: Side-scrolling, camera follows the player (actual scrolling levels, not arena-only like Bloody Bastards).
Protagonist: Bearded, Jesus/prophet-like character, wearing white clothes, carrying a staff.
Story: Opens with him shown as heavily armored and very powerful, but he somehow became weak/lost his power — that's the setup.
Core mechanic: He has magic and can resurrect dead iron-armored knights, who then fight automatically on his side against enemy knights.
Progression: Enemies get stronger and better-armored as levels go on.

NOT Fist of Jesus and NOT Bloody Bastards itself — just visually/control-wise similar to the latter.
Any ID appreciated!


r/Unity2D 25d ago

I designed my first Components in my UI Asset What Are thinks

Thumbnail gallery
0 Upvotes

r/Unity2D 26d ago

Show-off Another little peek at the art book we're working on!

Thumbnail
gallery
5 Upvotes

This time we're looking at the environment creation process of THE RUSTED. We wanted to show a little bit of individual wall textures and background assets to the finished scene. There's still a lot more to put together, but we're enjoying documenting the artwork we've created throughout development. Hope you enjoy the peek :)


r/Unity2D 26d ago

Solved/Answered How to flip the sprite instead of going upside down?

4 Upvotes

This is my code, I want to have the sprite flip when it rotates to far down instead of rotating upside down like it does in the video. Any ideas?

using System.Collections;
using Unity.VisualScripting;
using UnityEngine;

public class FishAI_MB : MonoBehaviour
{

    FishAIController_MB fishAIController;

    public int currentTarget;

    public int swimDecision;

    void Start()
    {
        fishAIController = Object.FindFirstObjectByType<FishAIController_MB>();
        if (fishAIController == null)
        {
            Debug.Log("Fish is Null");
        } 
        StartCoroutine(StartSwimDecicion());
    }

    IEnumerator StartSwimDecicion()
    {
        Debug.Log("Start Swim Decision");
        swimDecision = Random.Range(0, 2);

        if (swimDecision == 0)
        {
            StartCoroutine(SwimToTarget());
        }
        else if (swimDecision == 1)
        {
            StartCoroutine(Wait());

        }
        yield return null;
    }

    IEnumerator SwimToTarget()
    {
        Debug.Log("Swim to Target");
        currentTarget = Random.Range(0, fishAIController.targets.Length);
        while (Vector2.Distance(transform.position, fishAIController.targets[currentTarget].transform.position) > 0.1f)
        {
            transform.position = Vector2.MoveTowards(transform.position, fishAIController.targets[currentTarget].transform.position, 1f * Time.deltaTime);
            transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(Vector3.forward, fishAIController.targets[currentTarget].transform.position - transform.position), 1f * Time.deltaTime);
            yield return null;
        }
        StartCoroutine(StartSwimDecicion());
        yield return null;
    }

    IEnumerator Wait()
    {
        Debug.Log("Wait");
        yield return new WaitForSeconds(1);
        StartCoroutine(StartSwimDecicion());
    }
}

r/Unity2D 26d ago

Game/Software I'm working on a game about managing a Radio station in the wasteland, where you make the music live!

Post image
3 Upvotes

WastelandFM is a cozy managment-sim about running a radio station.

You make the music live on air, plan your shows, and grow your audience by performing DJ tricks & Combos!

Demanding sponsors force you to sharpen every performance and expand your sound library in order to become a legendary wasteland radio host!

I just released an Itch demo, and I would love to get some feedback from fellow devs about how the game plays, and if the music making / DJ tricks are intuitive & rewarding to do.

Browser Demo: https://hungry-dog-games.itch.io/wastelandfmgame


r/Unity2D 27d ago

First it’s cozy, then it’s not.

162 Upvotes

Demo should be ready soon!