r_unity3d | Unsorted

Telegram-канал r_unity3d - r/Unity3D

156

News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).

Subscribe to a channel

r/Unity3D

Our Unity Game demo is available at Steam during Nextfest
https://redd.it/1ix9et1
@r_Unity3D

Читать полностью…

r/Unity3D

Art Assets for your games! - Link in comments
https://redd.it/1ix596w
@r_Unity3D

Читать полностью…

r/Unity3D

My Unity project Effulgence RPG has reached 10k wishlists on Steam! Thank you all! I'm pushing forward with even more enthusiasm.

https://redd.it/1ix0897
@r_Unity3D

Читать полностью…

r/Unity3D

Hide objects behind a wall

In my 2d top down game I want some objects to invisible behind my walls (my walls have a box collider) and only visible when the player "sees" the object. I am a using a sprite mask but that does not solve what I am aiming for. Anyone got any tips on how to achieve this or have faced a similar issue?

In the example image, the medkit should not be visible as there is a wall between

https://preview.redd.it/z8k4jh5co2le1.png?width=703&format=png&auto=webp&s=21989e4d3ad196e49f30c0a8ab9f152ce71a2d75



https://redd.it/1iwzx2w
@r_Unity3D

Читать полностью…

r/Unity3D

What every game dev doesn't want to see
https://redd.it/1iwoxeb
@r_Unity3D

Читать полностью…

r/Unity3D

Recently started making a new game and experimenting with character design and animations and overall visuals, like the clay and fabric textures.

https://redd.it/1iwnrcc
@r_Unity3D

Читать полностью…

r/Unity3D

This new feature seems incredible
https://youtu.be/Oylx_SWnlgE?si=ZUTwDj2fPQ9Mikge

https://redd.it/1iwmaym
@r_Unity3D

Читать полностью…

r/Unity3D

Unity 2D Tilemap Can Actually Be Fully 3D

https://redd.it/1iwleap
@r_Unity3D

Читать полностью…

r/Unity3D

if (CurrentLookDirection == LookDirection.Right)
{
playerSprite.flipX = false;
}
else if (CurrentLookDirection == LookDirection.Left)
{
playerSprite.flipX = true;
}
}

private void OnFire()
{
Debug.Log("Fire");
}
}

I also tried this camera script I found online, which didn't seem to help with the crosshair jitter:

[https://gist.github.com/venediklee/1437f3c908cc135be10c4ddb2f23bec9](https://gist.github.com/venediklee/1437f3c908cc135be10c4ddb2f23bec9)

https://redd.it/1iwjstv
@r_Unity3D

Читать полностью…

r/Unity3D

Sprite jitter when using pixel perfect camera and camera movement

[The video looks a bit weird because of gif conversion](https://i.redd.it/zbnq5cx87yke1.gif)

Hi, I am trying to make a pixel art game and I really like the look of the pixel perfect camera where everything is on the pixel grid. However, I am having this issue where moving sprites will jitter as long as the camera is moving. I am using Cinemachine right now, but I have tried a custom camera script, and while it helps with the player's jittering, other sprites still jitter.

I have tried a lot of solutions, including snapping both the camera and the sprite to the pixel grid, but nothing seems to get rid of it. Also have tried disabling dampening, etc. but it seems to happen with basically any camera movement. Would really appreciate any advice or solutions. I am thinking I might have to use something other than the pixel perfect camera as it does not appear to be working well in Unity.


Here is the relevant code:

Input manager:

public class InputManager : MonoBehaviour
{
public static Vector2 Movement;
public static Vector2 Look;

private PlayerInput playerInput;

private InputAction moveAction;
private InputAction lookAction;

private GameObject aimTarget;

private Vector2 lastLookOffset;

[SerializeField] private float aimDistance = 2f;
[SerializeField] private float aimSmoothing = 10f;
[SerializeField] private float gamepadDeadzone = 0.5f;

void Awake()
{
playerInput = GetComponent<PlayerInput>();
moveAction = playerInput.actions["Move"];
lookAction = playerInput.actions["Look"];

aimTarget = GameObject.Find("AimTarget");
if (aimTarget == null)
{
aimTarget = new GameObject("AimTarget");
aimTarget.transform.position = Vector3.zero; // Default position
}
}


void Update()
{
Movement = moveAction.ReadValue<Vector2>();
Look = ProcessLookInput();

//aimTarget.transform.position = new Vector3(Mathf.Round(Look.x * 16) / 16, Mathf.Round(Look.y * 16) / 16, aimTarget.transform.position.z);
aimTarget.transform.position = new Vector3(Look.x, Look.y, aimTarget.transform.position.z);
}


private Vector2 ProcessLookInput()
{
Vector2 lookInput = lookAction.ReadValue<Vector2>();

string controlScheme = playerInput.currentControlScheme;

Vector2 playerPosition = transform.position;

float distanceToPlayer = Vector2.Distance(playerPosition, Look);

if (controlScheme == "KeyboardMouse")
{
//Vector3 mousePosition = Mouse.current.position.ReadValue();
return Camera.main.ScreenToWorldPoint(lookInput);
}
else if (controlScheme == "Gamepad" && lookInput.magnitude > gamepadDeadzone)
{
Vector2 aimOffset = new Vector2(lookInput.x, lookInput.y) * aimDistance;
Vector2 targetLook = playerPosition + aimOffset;
lastLookOffset = lookInput.normalized;
return Vector2.Lerp(Look, targetLook, Time.deltaTime * aimSmoothing);
}
else if (controlScheme == "Gamepad")
{
if (lastLookOffset == Vector2.zero)
{
lastLookOffset = new Vector2(1, 0);
}
return Vector2.Lerp(Look, (playerPosition + (lastLookOffset * aimDistance * 0.5f)), Time.deltaTime * aimSmoothing);
}

return Look;
}

}



Player controller:

public class PlayerController : MonoBehaviour
{
[Header("Movement")]
[SerializeField] private float moveSpeed = 5f;
[SerializeField] private float smoothTime = 0.1f;

[Header("References")]

Читать полностью…

r/Unity3D

I tried flip mechanism for rally car, just testing to see if its fun.

https://redd.it/1iwe23e
@r_Unity3D

Читать полностью…

r/Unity3D

Where u get sprites

I'm looking for the sprites that would be used for my game. Tell me the way to get sprites except for itch io or asset store in unity.

https://redd.it/1impsh4
@r_Unity3D

Читать полностью…

r/Unity3D

Unity just laid off the entire staff for their Behavior package...

Source (forums): https://discussions.unity.com/t/an-update-on-behavior/1598451

For those that don't know, Behavior package is a recent package announced months back as a visual tool for authoring behaviors used to control non-player characters (NPCs) or objects. Essentially a behavior tree (but it goes beyond that). You might think of Muse AI but they are completely separate packages.

Anyone find this news incredibly disappointing? The package was for once actually very good and it had a use case for a lot of games. The team involved in this has also been very transparent in communications over the updates and has been very active in the forums to answer questions, even adding features that were requested.

What are the executives even thinking here? Killing off a package and its team before it could fully take off. We finally had something good here...

https://redd.it/1imk2qv
@r_Unity3D

Читать полностью…

r/Unity3D

After tons of sketches, we finally nailed down our rock enemies! Eric, our designer/animator, designed a whole family of stone monsters—neutral, distinct, and tough enough that you won’t feel too bad smashing them😁
https://redd.it/1im847u
@r_Unity3D

Читать полностью…

r/Unity3D

How to add dynamic shadows like Guacamelee 2?
https://redd.it/1imeau9
@r_Unity3D

Читать полностью…

r/Unity3D

I'm making a minimalist speedrun aim game

https://redd.it/1ix3uf4
@r_Unity3D

Читать полностью…

r/Unity3D

Finally approved!!

After a year of work on our game, Plantasia, we've finally battled through Steam revision notes and have gotten our demo approved in time for Next Fest! It's been such a crunch for our team, but we're hoping this week can be a nice celebration for such a great milestone for us <3

You can check out our page here if you're interested in seeing our game and/or page layout: https://store.steampowered.com/app/3236330/Plantasia/

https://redd.it/1ix41t3
@r_Unity3D

Читать полностью…

r/Unity3D

Questions about cutscenes with characters

Hi, I'm relatively new to game development and I have a couple of questions about cutscenes. I'm working on a 2D choice-based games, similar to until dawn or the Dark Pictures Anthology and a couple of questions have come up:


1: How do you make it so that you don't have hundred of cutscenes in one scene? Fo example on my first scene, you have a cutscene at the beggining, ne in the middle where you make your choice and a cutscene following that choice. If we take in account that there are three characters that you can control in the scene, each with their own dialogs. How do you make it so that you don't have to make 20 cutscene for each character and variation?


2: Similar to before. Let's say I have a cutscene where the character plays a running animation. Is there a way to have only one cutscene and have the chosen character perform it instead of having 1 runnign cutscene for each character?


3: Not entirely related, but is there a way to check and change an object's variable through another object's script?


Thank you beforehand for any help you can give me

https://redd.it/1ix1bvl
@r_Unity3D

Читать полностью…

r/Unity3D

How do I fix my image within my game from being compressed?

https://redd.it/1iwyx4m
@r_Unity3D

Читать полностью…

r/Unity3D

My Space Base Builder game launched on Steam - Stellar Settlers (Made with Unity)

https://redd.it/1iwrvc7
@r_Unity3D

Читать полностью…

r/Unity3D

How to Skip a DoTween UI Animation?

I have a DoTween animation that plays when enabled. I’d like to let the player skip the entire animation by simply tapping the screen while the animation is running, but I haven’t found a solution yet. What would your approach be? Any suggestions?

https://redd.it/1iwo6n6
@r_Unity3D

Читать полностью…

r/Unity3D

Just Updated my game, I think there's a big jump, what version do you prefer? (first is the old Version, second photo is the new version)

https://redd.it/1iwn54x
@r_Unity3D

Читать полностью…

r/Unity3D

Improved the backgrounds and finally added a proper arcade mode to our fighting game Punch Planet, here's what it's looking like now.
https://streamable.com/4q7nwx

https://redd.it/1iwk8tg
@r_Unity3D

Читать полностью…

r/Unity3D

[SerializeField] SpriteRenderer playerSprite;

//Movement
private Vector2 movement, look;
private Vector2 velocityRef = Vector2.zero;

//Components
private PlayerControls playerControls;
private Rigidbody2D rb;
private GunController[] gunControllers;
private Animator animator;

//Animation
private string currentAnimation = "";

public static LookDirection CurrentLookDirection { get; private set; } = LookDirection.Down;
public enum LookDirection
{
Left,
Right,
Up,
Down
}


void Start()
{
playerControls = new PlayerControls();
rb = GetComponent<Rigidbody2D>();
gunControllers = GetComponentsInChildren<GunController>();
animator = GetComponent<Animator>();
//Cursor.visible = false;
}
/*
void FixedUpdate()
{
movement.Set(InputManager.Movement.x, InputManager.Movement.y);
rb.linearVelocity = Vector2.SmoothDamp(rb.linearVelocity, movement * moveSpeed, ref velocityRef, smoothTime);
}*/
void FixedUpdate()
{
// Get player input movement
movement.Set(InputManager.Movement.x, InputManager.Movement.y);

// Smooth velocity update
rb.linearVelocity = Vector2.SmoothDamp(rb.linearVelocity, movement * moveSpeed, ref velocityRef, smoothTime);

// Define the pixel grid size
float pixelSize = 1f / 16f;

Vector2 correctedVelocity;

// Snap the position to the grid
correctedVelocity.x = Mathf.Round(rb.linearVelocity.x / pixelSize) * pixelSize;
correctedVelocity.y = Mathf.Round(rb.linearVelocity.y / pixelSize) * pixelSize;

rb.linearVelocity = correctedVelocity;
}



private void Update()
{
look = InputManager.Look;

foreach (GunController gun in gunControllers)
{
gun.LookPosition = look;
}

CurrentLookDirection = GetLookDirection(look);
//Debug.Log("Looking: " + CurrentLookDirection);

ProcessLookDirection();
AnimateMovement();

}

private void AnimateMovement()
{
if (CurrentLookDirection == LookDirection.Down)
{
if (movement != Vector2.zero)
{
animator.Play("Player_WalkDown");
}
else
{
animator.Play("Player_IdleDown");
}
}
else if (CurrentLookDirection == LookDirection.Right || CurrentLookDirection == LookDirection.Left)
{
if (movement != Vector2.zero)
{
animator.Play("Player_WalkSide");
}
else
{
animator.Play("Player_IdleSide");
}
}
else if (CurrentLookDirection == LookDirection.Up)
{
if (movement != Vector2.zero)
{
animator.Play("Player_WalkUp");
}
else
{
animator.Play("Player_IdleUp");
}
}
}

public LookDirection GetLookDirection(Vector2 point)
{
Vector2 objectPosition = transform.position;
Vector2 direction = point - objectPosition;

if (Mathf.Abs(direction.x) > Mathf.Abs(direction.y))
{
return direction.x > 0 ? LookDirection.Right : LookDirection.Left;
}
else
{
return direction.y > 0 ? LookDirection.Up : LookDirection.Down;
}
}

private void ProcessLookDirection() {

Читать полностью…

r/Unity3D

I have created a free tool with unity with which you can easily create bouncy ball shorts with many different settings to change.
https://jf-development-01.itch.io/bouncyball-creator

https://redd.it/1iwhxcb
@r_Unity3D

Читать полностью…

r/Unity3D

Which one do you think looks the most aesthetically pleasing?
https://redd.it/1imo578
@r_Unity3D

Читать полностью…

r/Unity3D

Hopefully easy noob question re. Unity's 2d Roguelike tutorial Add Food Resource challenge

New to Unity and going through the 2d Roguelike tutorial. No issues until the first challenges section (part 6) in the "Add A Food Resource" section (link below). Is there anywhere with a useful repository, video, anything to refer to with better guidance:

EASY: Instead of always generating five food prefabs, have your game generate a random number of food based on a range we can customize in the inspector.

I can do this in the code with no issue but can’t figure out how to get it added to the inspector so it is customizable there. I am not even sure if it should be going in the SmallFood prefab Inspector area or the BoardManager.

I am sure these things are very obvious to everyone else experienced here but I am stumped and frustrated after googling and testing for way too long. I am sure I am overcomplicating it but could use help, please. Thanks

Link to relevant section:

https://learn.unity.com/tutorial/66f53fc0edbc2a0e824400de?uv=6&amp;courseId=66fa6d33edbc2a141af15aae#66f6bde9edbc2a06dc1877fb

https://redd.it/1imho9i
@r_Unity3D

Читать полностью…

r/Unity3D

[for hire] 🎨 Experienced Artist offering Custom Character Design Sheets/Boards for Your Projects!

https://redd.it/1imjldr
@r_Unity3D

Читать полностью…

r/Unity3D

Need ressources to solidify my knowledge on Unity programming

Hello,
I have been learning code as a self-taught developer since high school, and now, I'm in my second year of college, but I am not studying computer science.

I have been creating a game with a friend for 1 month, and I have been programming and learning on Unity for 6 months. But even though I have learnt the basics of C# and Unity, I have really had difficulties understanding more complex programming concepts, like having a smooth feel for the player movement. I feel like it's a separate world between me and people that are a bit "professional" in videogame development.

But, when I try to find some tutorials for more advanced people in programming, I don't find anything, and I can't learn more complex programming at school.

So, I wanted to know if you have some resources, written or video-based, to solidify my knowledge of videogame development and programming. It can be long articles, detailed videos, or even some paid resources.

I really want to be very good at programming because, if I can, I want to work in this industry, even if it's not the best period for video games right now.

Sorry if my English is not very good, it's not my mother tongue \^\^'
Thanks!

https://redd.it/1img6ss
@r_Unity3D

Читать полностью…

r/Unity3D

It’s work related
https://youtu.be/BmYPzTOxxY4?si=sT_ZDN9XNgyA4VeY

https://redd.it/1imdbwr
@r_Unity3D

Читать полностью…
Subscribe to a channel