r/Unity3D
266 subscribers
12.7K photos
15.6K videos
14 files
48K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
We’re making a medieval pinball game with roguelite deckbuilding – our free demo is now out on Steam!

https://redd.it/1qkrbdp
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
What do you think about the idea of a cooperative horror inspired by portals?
Except instead of a portal, it’s a door to other worlds inhabited by terrifying creatures.
I’m launching the first major playtest and would really appreciate your attention.

https://redd.it/1qkws4k
@r_Unity3D
Made my first devlog!

Hey good people of reddit,

This past month I've been getting into game development. As a complete noob in coding and art, I decided to document my journey through devlogs. Tonight, I uploaded my first ever devlog, and video, to YouTube. It feels pretty exciting to finish something.

I wont be posting a link or anything, I dont wanna be that guy. Lets just hope it gets pushed in the right direction of the algorithm :).

From time to time, I'll try to make a post on here to keep you guys posted on my games progress. If you're really eager to watch, PM me to get the video.

Have a good friday and cheers!

https://redd.it/1ql3rrw
@r_Unity3D
My first game is live on the steam store!!!!!
https://redd.it/1qlf4r1
@r_Unity3D
I made a Photoshop-style "Drag & Pull" Guide system for Unity 2D (50% Launch Discount)
https://redd.it/1qlkuzu
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
Real fireworks rocket vs frozen river ice - ice explosion in our Unity game!

https://redd.it/1qlxb1m
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Metaball dome shields in Unity 2D (URP) - slimes merge shields when close
https://redd.it/1qm36ke
@r_Unity3D
We literally ALL started out like this...(OC)
https://redd.it/1qqqafc
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
Working on a 2 player coop game where you play as two lumberjacks standing on a log and rolling it together

https://redd.it/1qqkp8x
@r_Unity3D
Novice here, how do you guys use the New Input System

now i've been making small-scale games for about a year and have never really used the new input system (I also hadn't bothered updating unity for a while so only started using unity 6 about 4 months ago) and I really haven't worked with it much. Now that I'm starting to make a larger game (a 2d zelda style game), I tried looking into using the unity NIS and it has been a struggle. I've kinda gotten overwhelmed and all the tutorials I find seem to have a different way of explaining how to do the same thing without actually explaining why they do one thing the one way and I haven't found a good explanation on how each of these systems work. (except for the inputmaps, I have that down but the programming side is my issue) So far I have made 2 different top down player movement systems (no reason why one is better than the other) and mouse tracking but that is about it.

So do you guys have any good tutorials or explanations you guys can point me towards because I'm unsure whether its just a comprehension issue, bad searches or if I'm just doing it all wrong.

https://redd.it/1qqvl2j
@r_Unity3D
variable jump height

wanting to make variable jump height, (following along a tutorial in the hopes to get started), however im not sure where I went wrong when trying it

it does a normal full jump each time instead of lesser jump when hitting space

(extra details include using new input system, and unity 6.2)


The upside is, that it doesnt seem to be messing with the code in bad way aside from making the player doing an extra jump when landing on the ground from spamming space bar

using UnityEngine;
using UnityEngine.InputSystem;

public class Player : MonoBehaviour
{
[Header("Components")]
public Rigidbody2D rb;
public PlayerInput playerInput;
public Animator anim;

[Header("Movement Variables")]
public float speed;
public float jumpForce;
public float jumpCutMultiplier = .5f;
public float normalGravity;
public float fallGravity;
public float jumpGravity;

public int faceDirection = 1;


// tracking inputs
public Vector2 moveInput;
private bool jumpPressed;
private bool jumpReleased;

[Header("Ground Check")]
public Transform groundCheck;
public float groundCheckRadius;
public LayerMask groundLayer;
private bool isGrounded;


private void Start()
{
rb.gravityScale = normalGravity;
}

void Update()
{

Flip();
HandleAnimations();
}


void FixedUpdate()
{
ApplyVariableGravity();
CheckGrounded();
HandleMovement();
HandleJump();
}


private void HandleMovement()
{
float targetSpeed = moveInput.x * speed;
rb.linearVelocity = new Vector2(targetSpeed, rb.linearVelocity.y);
}

private void HandleJump()
{
if (jumpPressed && isGrounded)
{
rb.linearVelocity = new Vector2(rb.linearVelocity.x, jumpForce);
jumpPressed = false;
jumpReleased = false;
}
if (jumpReleased)
{
if (rb.linearVelocity.y > 0) // if still going up
{// lesser jumps with code below thanks to jump cut multiplier * the Y of rigidbody velocity
rb.linearVelocity = new Vector2(rb.linearVelocity.x, rb.linearVelocity.y * jumpCutMultiplier);
}
jumpReleased = false;
}
}


void ApplyVariableGravity()
{
if (rb.linearVelocity.y < -0.1) // falling
{
rb.gravityScale = fallGravity;
}
else if (rb.linearVelocity.y > 0.1) //rising
{
rb.gravityScale = jumpGravity;
}
else
{
rb.gravityScale = normalGravity;
}
}


void CheckGrounded()
{
isGrounded = Physics2D.OverlapCircle(groundCheck.position, groundCheckRadius, groundLayer);
}

void HandleAnimations()
{
anim.SetBool("isJumping", rb.linearVelocity.y > .1f);
anim.SetBool("isGrounded", isGrounded);

anim.SetFloat("yVelocity", rb.linearVelocity.y);

anim.SetBool("isIdle", Mathf.Abs(moveInput.x) < .1f && isGrounded);
anim.SetBool("isWalking", Mathf.Abs(moveInput.x) > .1f && isGrounded);
}


void Flip()
{
if (moveInput.x > 0.1f)
{
faceDirection = 1;
}
else if(moveInput.x < -0.1f)
{
faceDirection = -1;
}

transform.localScale = new Vector3(faceDirection, 1, 1);
}



public void OnMove (InputValue value)
{
moveInput = value.Get<Vector2>();
}
public void OnJump (InputValue value)
{
if (value.isPressed)
{
jumpPressed = true;
jumpReleased = false;
}
else //if the jump button has been released
{
jumpReleased = true;
}

}


private void OnDrawGizmosSelected()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(groundCheck.position, groundCheckRadius);
}
}



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