private void FixedUpdate()
{
// Apply horizontal movement for Player 1 only
rb1.velocity = new Vector2(horizontal1 speed1, rb1.velocity.y);
// The frog retains its horizontal velocity when grounded
if (!isGrounded2 && !wasInAir2)
{
// Keep horizontal velocity in the air until the jump is released
rb2.velocity = new Vector2(rb2.velocity.x, rb2.velocity.y);
}
}
private bool IsGrounded(Transform groundCheck, LayerMask groundLayer)
{
// Check if the player is on the ground (groundLayer)
return Physics2D.OverlapCircle(groundCheck.position, 0.2f, groundLayer);
}
private void Flip(ref bool isFacingRight, float horizontal, Transform playerTransform)
{
if (isFacingRight && horizontal < 0f || !isFacingRight && horizontal > 0f)
{
isFacingRight = !isFacingRight;
Vector3 localScale = playerTransform.localScale;
localScale.x = -1f;
playerTransform.localScale = localScale;
}
}
private void OnDrawGizmos()
{
// Draw the ground check areas for debugging
if (groundCheck1 != null)
{
Gizmos.color = Color.green;
Gizmos.DrawWireSphere(groundCheck1.position, 0.2f);
}
if (groundCheck2 != null)
{
Gizmos.color = Color.blue;
Gizmos.DrawWireSphere(groundCheck2.position, 0.2f);
}
}
}
https://redd.it/1gzm1by
@r_Unity3D
{
// Apply horizontal movement for Player 1 only
rb1.velocity = new Vector2(horizontal1 speed1, rb1.velocity.y);
// The frog retains its horizontal velocity when grounded
if (!isGrounded2 && !wasInAir2)
{
// Keep horizontal velocity in the air until the jump is released
rb2.velocity = new Vector2(rb2.velocity.x, rb2.velocity.y);
}
}
private bool IsGrounded(Transform groundCheck, LayerMask groundLayer)
{
// Check if the player is on the ground (groundLayer)
return Physics2D.OverlapCircle(groundCheck.position, 0.2f, groundLayer);
}
private void Flip(ref bool isFacingRight, float horizontal, Transform playerTransform)
{
if (isFacingRight && horizontal < 0f || !isFacingRight && horizontal > 0f)
{
isFacingRight = !isFacingRight;
Vector3 localScale = playerTransform.localScale;
localScale.x = -1f;
playerTransform.localScale = localScale;
}
}
private void OnDrawGizmos()
{
// Draw the ground check areas for debugging
if (groundCheck1 != null)
{
Gizmos.color = Color.green;
Gizmos.DrawWireSphere(groundCheck1.position, 0.2f);
}
if (groundCheck2 != null)
{
Gizmos.color = Color.blue;
Gizmos.DrawWireSphere(groundCheck2.position, 0.2f);
}
}
}
https://redd.it/1gzm1by
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Click on shapes and do some letter combination... the game. I made it. Go play it
Don't be a SQUARE is fucking out now. Click on the shapes or whatever and do some letter combination shit. You won't win cause its kinda hard. I didn't finish it. Go play it!
https://differentpixels.itch.io/dont-be-a-square
https://redd.it/1gzqmjk
@r_Unity3D
Don't be a SQUARE is fucking out now. Click on the shapes or whatever and do some letter combination shit. You won't win cause its kinda hard. I didn't finish it. Go play it!
https://differentpixels.itch.io/dont-be-a-square
https://redd.it/1gzqmjk
@r_Unity3D
itch.io
Don't be a square by mik
Try not to be a quare. Play in your browser
This media is not supported in your browser
VIEW IN TELEGRAM
A Little Animation Explaining how Meshes are Rendered for a Video I'm Working on
https://redd.it/1gzml6q
@r_Unity3D
https://redd.it/1gzml6q
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Here’s the Trailer for out first game, SPIN Protocol. Demo now playable on Steam. We’d love your feedback!
https://redd.it/1gzoga8
@r_Unity3D
https://redd.it/1gzoga8
@r_Unity3D
I have a Singleton Manager. Does it matter if I write " foo " or " Manager.foo " when I'm writing code inside the Manager class ?
https://redd.it/1gzquqp
@r_Unity3D
https://redd.it/1gzquqp
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Added a weather system to our procedural freeriding skiing game SNØ - What riding with clear skies vs. during a snow storm looks like
https://redd.it/1gzp5ia
@r_Unity3D
https://redd.it/1gzp5ia
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
a Minigame Mechanic from Party Spirits, my Upcoming 2-6 Player Online Party Game
https://redd.it/1gzxs9i
@r_Unity3D
https://redd.it/1gzxs9i
@r_Unity3D
Difficulty of a 2 player card game? - Mirror
Hello, experienced C# dev for my profession, dabbled a bit in unity. I understand the feeling of being in over your head by trying to make a 3d hack and slash game, and it’s just too much. I want to make something simpler and fun. I figured a card game would be very component based, so once the uphill battle of initial setup and multiplayer setup is done, I can get rolling.
However, how difficult of a project is this, comparatively? I understand there is a scale between simple 2d platformer and MMO, where does this fall on the scale ?
https://redd.it/1gzwxza
@r_Unity3D
Hello, experienced C# dev for my profession, dabbled a bit in unity. I understand the feeling of being in over your head by trying to make a 3d hack and slash game, and it’s just too much. I want to make something simpler and fun. I figured a card game would be very component based, so once the uphill battle of initial setup and multiplayer setup is done, I can get rolling.
However, how difficult of a project is this, comparatively? I understand there is a scale between simple 2d platformer and MMO, where does this fall on the scale ?
https://redd.it/1gzwxza
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
It's been over 10 years and you still can't add enums as an argument to button functions
https://discussions.unity.com/t/ability-to-add-enum-argument-to-button-functions/551773/186
https://redd.it/1h02bvr
@r_Unity3D
https://discussions.unity.com/t/ability-to-add-enum-argument-to-button-functions/551773/186
https://redd.it/1h02bvr
@r_Unity3D
Has anyone had and experience with GPU Instancer Pro? I want to know if this will actually improve the performance of my projects?
https://redd.it/1gzulmr
@r_Unity3D
https://redd.it/1gzulmr
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Created my fastest new weapon by changing bullets to bigger fire bullets to end up with a flame thrower instead of a shotgun. Love when systems works as designed!
https://redd.it/1h08our
@r_Unity3D
https://redd.it/1h08our
@r_Unity3D
My 2D pixel art player sprite is too big.
I have made a player sprite that I absolutely love, however it is extremely big.
Because I'm in pixel art, I can't lower the sprite's transform scale value, it will be weird. I can't tweak the sprite itself, because of its tall structure.
Is there a way to making it smaller, without making making another sprite entirely?
https://redd.it/1h0atq5
@r_Unity3D
I have made a player sprite that I absolutely love, however it is extremely big.
Because I'm in pixel art, I can't lower the sprite's transform scale value, it will be weird. I can't tweak the sprite itself, because of its tall structure.
Is there a way to making it smaller, without making making another sprite entirely?
https://redd.it/1h0atq5
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Does anyone else do this to force important folders to the top? Is there a better way?
https://redd.it/1h0drvx
@r_Unity3D
https://redd.it/1h0drvx
@r_Unity3D
Best way of creating a hacking mini-game on top of game.
I wanted to create a hacking mini-game on top of my game and I'm not sure how to approach it, my first instict has been to create the game as an UI element and use that for the game as doing this it will not interfere with anything in the main game but I'm not sure if this is the best approach or if a better approach will be to just "add" all the game elements on top of the game and disable physic interations between elements of both realms.
Any tips?
https://redd.it/1h0kune
@r_Unity3D
I wanted to create a hacking mini-game on top of my game and I'm not sure how to approach it, my first instict has been to create the game as an UI element and use that for the game as doing this it will not interfere with anything in the main game but I'm not sure if this is the best approach or if a better approach will be to just "add" all the game elements on top of the game and disable physic interations between elements of both realms.
Any tips?
https://redd.it/1h0kune
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Starting 2D Development
Hey all,
I'm hoping to start developing a 2D I've had in my head for a long time. I'm wondering what Unity Learn course to follow as a very foundational learning pathway. Or any resource you've found helpful. Any links would be appreciated.
Thanks!
https://redd.it/1h0kisv
@r_Unity3D
Hey all,
I'm hoping to start developing a 2D I've had in my head for a long time. I'm wondering what Unity Learn course to follow as a very foundational learning pathway. Or any resource you've found helpful. Any links would be appreciated.
Thanks!
https://redd.it/1h0kisv
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community