Rotations are inconsistent
I'm making a game where you are a triangle and have to climb over obstacles by moving left and right (A+D), and rotating left and right (arrow keys)
sometimes the triangle will rotate over its edge with ease, and then i'll reload the game and it will start to struggle even if i didnt touch the code or rotation speed
is there anything i can do to make it work more?
https://preview.redd.it/0cdcjbtj951e1.png?width=516&format=png&auto=webp&s=3450014604125632911ea840c34d1b78817169d5
https://redd.it/1gs95nc
@r_Unity3D
I'm making a game where you are a triangle and have to climb over obstacles by moving left and right (A+D), and rotating left and right (arrow keys)
sometimes the triangle will rotate over its edge with ease, and then i'll reload the game and it will start to struggle even if i didnt touch the code or rotation speed
is there anything i can do to make it work more?
https://preview.redd.it/0cdcjbtj951e1.png?width=516&format=png&auto=webp&s=3450014604125632911ea840c34d1b78817169d5
https://redd.it/1gs95nc
@r_Unity3D
Which one would you recommend for 2d vfx for games? ToonBoon Harmony or AfterEffects?
https://redd.it/1gs8iyp
@r_Unity3D
https://redd.it/1gs8iyp
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
2d isometric visual effects
im trying to make a game about magic and need visual effects for my spells. Im kinda new and don't know what's the best way to achieve that. Is it better to do effects (different explosions, beams stuff like that) via sprite sheets or particle systems /vfx graph and pixelizer shaders?
https://redd.it/1gsbkh2
@r_Unity3D
im trying to make a game about magic and need visual effects for my spells. Im kinda new and don't know what's the best way to achieve that. Is it better to do effects (different explosions, beams stuff like that) via sprite sheets or particle systems /vfx graph and pixelizer shaders?
https://redd.it/1gsbkh2
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Stretching shader
i created this shader using shdergrapgh :
https://preview.redd.it/4uyhdn2xp51e1.png?width=477&format=png&auto=webp&s=f522ae68d427203776ff44efe42c2a4f6c7f361c
but when i scale it , it becomes distorted
https://preview.redd.it/rmmohzl3q51e1.png?width=159&format=png&auto=webp&s=31380b4ec208438253fee731f1f85182bd6488e8
How to fix this?
https://redd.it/1gsay8t
@r_Unity3D
i created this shader using shdergrapgh :
https://preview.redd.it/4uyhdn2xp51e1.png?width=477&format=png&auto=webp&s=f522ae68d427203776ff44efe42c2a4f6c7f361c
but when i scale it , it becomes distorted
https://preview.redd.it/rmmohzl3q51e1.png?width=159&format=png&auto=webp&s=31380b4ec208438253fee731f1f85182bd6488e8
How to fix this?
https://redd.it/1gsay8t
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
I've always felt that there aren't many good games based around Christmas, so I decided to make one!
https://redd.it/1gs8x4y
@r_Unity3D
https://redd.it/1gs8x4y
@r_Unity3D
Asking for advice and direction for creating a mystery narrative game.
Hi,
I'm working on a narrative mystery game inspired by games like Ace Attorney or Danganronpa, and I'm looking for some guidance on how to structure the game in Unity. I have experience in programming but am new to Unity and still learning, so the overall game design and structure are still a mystery to me.
I think the game will need a main menu, a dialogue section for only conversations, an investigation mode (point and click), and an argument mode (conversation and mini-games like Danganronpa).
How should I decide which components to create as separate scenes? How can I move from visual novel mode to investigation mode? How can I make the inventory persistent across any mode?
Any advice or tutorials on structuring the game and deciding which components should be separate would be very helpful, because as you can see, I am confused.
Thanks in advance!
https://redd.it/1gse723
@r_Unity3D
Hi,
I'm working on a narrative mystery game inspired by games like Ace Attorney or Danganronpa, and I'm looking for some guidance on how to structure the game in Unity. I have experience in programming but am new to Unity and still learning, so the overall game design and structure are still a mystery to me.
I think the game will need a main menu, a dialogue section for only conversations, an investigation mode (point and click), and an argument mode (conversation and mini-games like Danganronpa).
How should I decide which components to create as separate scenes? How can I move from visual novel mode to investigation mode? How can I make the inventory persistent across any mode?
Any advice or tutorials on structuring the game and deciding which components should be separate would be very helpful, because as you can see, I am confused.
Thanks in advance!
https://redd.it/1gse723
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
For anyone working on a 2D RPG or adventure game this UI asset pack could be helpful Link in the comments
https://redd.it/1gsf0pc
@r_Unity3D
https://redd.it/1gsf0pc
@r_Unity3D
Reddit
From the Unity2D community on Reddit: For anyone working on a 2D RPG or adventure game this UI asset pack could be helpful Link…
Explore this post and more from the Unity2D community
hey, is it better to store files im using as sprites ingame as .png or .aseprite?
https://preview.redd.it/d025p27by61e1.png?width=1913&format=png&auto=webp&s=f1fca42786cd69e099033f2d77746229f0c6992f
https://redd.it/1gsffs0
@r_Unity3D
https://preview.redd.it/d025p27by61e1.png?width=1913&format=png&auto=webp&s=f1fca42786cd69e099033f2d77746229f0c6992f
https://redd.it/1gsffs0
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Working on RANDOBOUNCE, a fast-paced roguelike where you bounce uncontrollably, while shooting totally customizable weapons, bullets and perks (Reworking it after I won $100 with it on a Game Jam)
https://redd.it/1gsfvcq
@r_Unity3D
https://redd.it/1gsfvcq
@r_Unity3D
Professionals Only?
Is there a forum or place where professionals discuss Unity topics? Between unity breaking half their links to old blog posts when they moved their site, and the general trend of google getting worse, it's getting hard to find answers to obscure "unity quirks/bugs". (Dumb example... like what does "streaming" actually do on webgl? It appears to decompress the entire clip from a compressed asset bundle, behaving the same as decompress on load, but for some reason it bypasses the mute switch on iOS and plays in the background when minimizing the browser?)
At my job, I have an enterprise account that has official unity support, and we will contact them about some issues, but it takes a few days of back and forth and usually doesn't result in too much that is useful.
Is anyone aware of some secret forum/group where experienced devs can chat about stuff not filled with showoffs and beginner questions?
https://redd.it/1gsh19x
@r_Unity3D
Is there a forum or place where professionals discuss Unity topics? Between unity breaking half their links to old blog posts when they moved their site, and the general trend of google getting worse, it's getting hard to find answers to obscure "unity quirks/bugs". (Dumb example... like what does "streaming" actually do on webgl? It appears to decompress the entire clip from a compressed asset bundle, behaving the same as decompress on load, but for some reason it bypasses the mute switch on iOS and plays in the background when minimizing the browser?)
At my job, I have an enterprise account that has official unity support, and we will contact them about some issues, but it takes a few days of back and forth and usually doesn't result in too much that is useful.
Is anyone aware of some secret forum/group where experienced devs can chat about stuff not filled with showoffs and beginner questions?
https://redd.it/1gsh19x
@r_Unity3D
Reddit
From the Unity3D community on Reddit
Explore this post and more from the Unity3D community
Media is too big
VIEW IN TELEGRAM
I’ve always dreamed of creating a paradise, and as soon as I learned Unity, I set out to make Vacation Cafe Simulator, a cozy game. Experience the charming streets of Italy, sip on Prosecco, and craft incredible culinary masterpieces in your very own café.
https://redd.it/1gsipgl
@r_Unity3D
https://redd.it/1gsipgl
@r_Unity3D
The hand doesn't stick to the spring, help
I have troubles with making this hand stick to the bottom of the spring when i change size in "tiled" draw mode
https://preview.redd.it/zmaxhv93r81e1.png?width=2375&format=png&auto=webp&s=3803cc48df0d050b4288816e874531daa33632f9
https://preview.redd.it/dxkqzdy3r81e1.png?width=2359&format=png&auto=webp&s=541e95fa563f898afbb617105235520d3d05884e
I've tried to do it with
but it doesn't respond to changes.
https://redd.it/1gskmob
@r_Unity3D
I have troubles with making this hand stick to the bottom of the spring when i change size in "tiled" draw mode
https://preview.redd.it/zmaxhv93r81e1.png?width=2375&format=png&auto=webp&s=3803cc48df0d050b4288816e874531daa33632f9
https://preview.redd.it/dxkqzdy3r81e1.png?width=2359&format=png&auto=webp&s=541e95fa563f898afbb617105235520d3d05884e
I've tried to do it with
claw.transform.position = new Vector3(claw.transform.position.x, spring.transform.position.y, 0);but it doesn't respond to changes.
https://redd.it/1gskmob
@r_Unity3D
Updated! Metroidvania Template, player movement v3!
https://xthekendrick.itch.io/roguelike-metroidvania-tamplate-all-in-1
https://redd.it/1gsl55x
@r_Unity3D
https://xthekendrick.itch.io/roguelike-metroidvania-tamplate-all-in-1
https://redd.it/1gsl55x
@r_Unity3D
itch.io
Roguelike - Metroidvania Template (All in 1) by Kendrick ML
Complete 2d pixelArt Tamplate for fast prototyping metroidvania and roguelike.
Refering to a UI gameObject when prefab is instantiated
So the big sqaure in the middle with the image and the text that says \\"Tower, Stage 1, Firerate: 1, Upgrade\\" is the box i want to make appear.
So i im currently working on a small project, where its a Tower Defense game, and you earn your money by a little clicker minigame. I made the whole thing work fine, and you can buy towers and that. BUT now i want to basicly open up an upgrade menu where you can upgrade your towers. This is my current code for my tower:
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
public class CastleTower : MonoBehaviour
{
public TowerController towerController;
public SpriteRenderer SpriteRenderer;
public Sprite Castle1;
public Sprite Castle2;
public Sprite Castle3;
public Sprite Castle4;
public Sprite Castle5;
public bool Castle1Shown;
public bool Castle2Shown;
public bool Castle3Shown;
public bool Castle4Shown;
public bool Castle5Shown;
private bool isTakingDamage = false;
public int health;
private GameObject currentEnemy = null;
public Sprite currentSprite;
public Image upgradeImage;
public UpgradeMenu upgradeMenu;
public Ghost ghost;
private void Awake()
{
upgradeMenu = GameObject.Find("Upgrade Menu").GetComponent<UpgradeMenu>();
}
// Start is called before the first frame update
void Start()
{
currentSprite = Castle1;
upgradeMenu.closeMenu();
Castle1Shown = true;
Castle2Shown = false;
Castle3Shown = false;
Castle4Shown = false;
Castle5Shown = false;
}
// Update is called once per frame
void Update()
{
if (ghost.towerPlaced == true)
{
upgradeMenu = GameObject.Find("Upgrade Menu").GetComponent<UpgradeMenu>();
}
upgradeImage.sprite = currentSprite;
if (health < 0)
{
Destroy(gameObject);
}
if (Castle5Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle5;
Castle1Shown = false;
Castle2Shown = false;
Castle3Shown = false;
Castle4Shown = false;
currentSprite = Castle5;
}
if (Castle4Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle4;
Castle1Shown = false;
Castle2Shown = false;
Castle3Shown = false;
Castle5Shown = false;
currentSprite = Castle4;
}
if (Castle3Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle3;
Castle1Shown = false;
Castle2Shown = false;
Castle4Shown = false;
Castle5Shown = false;
currentSprite = Castle3;
}
if (Castle2Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle2;
Castle1Shown = false;
Castle3Shown = false;
Castle4Shown = false;
Castle5Shown = false;
currentSprite = Castle2;
}
if (Castle1Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle1;
Castle2Shown = false;
Castle3Shown = false;
Castle4Shown = false;
Castle5Shown = false;
currentSprite = Castle1;
}
}
public void OnMouseDown()
{
upgradeMenu.openMenu();
}
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.CompareTag("Enemy") && !isTakingDamage)
{
Debug.Log("Enemy collided with: " + gameObject.name);
currentEnemy = collision.gameObject; // Store the enemy reference
StartCoroutine(TakeDamageOverTime());
}
}
private void OnTriggerExit2D(Collider2D collision)
{
if (collision.gameObject == currentEnemy)
{
StopCoroutine(TakeDamageOverTime());
isTakingDamage = false;
currentEnemy = null; // Clear the enemy reference
}
}
private IEnumerator TakeDamageOverTime()
{
isTakingDamage = true; // Mark that damage is being applied
while (currentEnemy != null) // Ensure the enemy still exists
{
health -= 1; // Reduce health by 1
yield return new WaitForSeconds(1f); // Wait for 1 second
}
isTakingDamage = false; // Stop damage when the enemy is destroyed
}
public void stage1Active()
{
Castle1Shown = true;
}
}
And this is my code for spawning in the tower:
using
So the big sqaure in the middle with the image and the text that says \\"Tower, Stage 1, Firerate: 1, Upgrade\\" is the box i want to make appear.
So i im currently working on a small project, where its a Tower Defense game, and you earn your money by a little clicker minigame. I made the whole thing work fine, and you can buy towers and that. BUT now i want to basicly open up an upgrade menu where you can upgrade your towers. This is my current code for my tower:
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
public class CastleTower : MonoBehaviour
{
public TowerController towerController;
public SpriteRenderer SpriteRenderer;
public Sprite Castle1;
public Sprite Castle2;
public Sprite Castle3;
public Sprite Castle4;
public Sprite Castle5;
public bool Castle1Shown;
public bool Castle2Shown;
public bool Castle3Shown;
public bool Castle4Shown;
public bool Castle5Shown;
private bool isTakingDamage = false;
public int health;
private GameObject currentEnemy = null;
public Sprite currentSprite;
public Image upgradeImage;
public UpgradeMenu upgradeMenu;
public Ghost ghost;
private void Awake()
{
upgradeMenu = GameObject.Find("Upgrade Menu").GetComponent<UpgradeMenu>();
}
// Start is called before the first frame update
void Start()
{
currentSprite = Castle1;
upgradeMenu.closeMenu();
Castle1Shown = true;
Castle2Shown = false;
Castle3Shown = false;
Castle4Shown = false;
Castle5Shown = false;
}
// Update is called once per frame
void Update()
{
if (ghost.towerPlaced == true)
{
upgradeMenu = GameObject.Find("Upgrade Menu").GetComponent<UpgradeMenu>();
}
upgradeImage.sprite = currentSprite;
if (health < 0)
{
Destroy(gameObject);
}
if (Castle5Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle5;
Castle1Shown = false;
Castle2Shown = false;
Castle3Shown = false;
Castle4Shown = false;
currentSprite = Castle5;
}
if (Castle4Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle4;
Castle1Shown = false;
Castle2Shown = false;
Castle3Shown = false;
Castle5Shown = false;
currentSprite = Castle4;
}
if (Castle3Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle3;
Castle1Shown = false;
Castle2Shown = false;
Castle4Shown = false;
Castle5Shown = false;
currentSprite = Castle3;
}
if (Castle2Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle2;
Castle1Shown = false;
Castle3Shown = false;
Castle4Shown = false;
Castle5Shown = false;
currentSprite = Castle2;
}
if (Castle1Shown == true)
{
this.gameObject.GetComponent<SpriteRenderer>().sprite = Castle1;
Castle2Shown = false;
Castle3Shown = false;
Castle4Shown = false;
Castle5Shown = false;
currentSprite = Castle1;
}
}
public void OnMouseDown()
{
upgradeMenu.openMenu();
}
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.CompareTag("Enemy") && !isTakingDamage)
{
Debug.Log("Enemy collided with: " + gameObject.name);
currentEnemy = collision.gameObject; // Store the enemy reference
StartCoroutine(TakeDamageOverTime());
}
}
private void OnTriggerExit2D(Collider2D collision)
{
if (collision.gameObject == currentEnemy)
{
StopCoroutine(TakeDamageOverTime());
isTakingDamage = false;
currentEnemy = null; // Clear the enemy reference
}
}
private IEnumerator TakeDamageOverTime()
{
isTakingDamage = true; // Mark that damage is being applied
while (currentEnemy != null) // Ensure the enemy still exists
{
health -= 1; // Reduce health by 1
yield return new WaitForSeconds(1f); // Wait for 1 second
}
isTakingDamage = false; // Stop damage when the enemy is destroyed
}
public void stage1Active()
{
Castle1Shown = true;
}
}
And this is my code for spawning in the tower:
using
System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ghost : MonoBehaviour
{
public GameObject CastleTower1;
// Define the placement bounds (adjust these values to fit your specific area)
public Vector2 minBounds = new Vector2(-5.5f, -4.4f); // Bottom-left corner
public Vector2 maxBounds = new Vector2(5.5f, 4.5f); // Top-right corner
public CastleTower castleTower;
public bool towerPlaced;
private void Start()
{
towerPlaced = false;
}
// Update is called once per frame
void Update()
{
// Get the mouse position in world space
Vector3 mousPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousPos.z = 0;
// Clamp the position to stay within the defined bounds
mousPos.x = Mathf.Clamp(mousPos.x, minBounds.x, maxBounds.x);
mousPos.y = Mathf.Clamp(mousPos.y, minBounds.y, maxBounds.y);
// Update the ghost's position
transform.position = mousPos;
// Place the tower and destroy the ghost on left mouse click
if (Input.GetMouseButtonDown(0))
{
// Check if the position is within the allowed area (optional, as clamping already handles this)
if (IsWithinBounds(mousPos))
{
Instantiate(CastleTower1, transform.position, Quaternion.identity);
Destroy(gameObject);
towerPlaced = true;
}
}
}
bool IsWithinBounds(Vector3 position)
{
return position.x >= minBounds.x && position.x <= maxBounds.x &&
position.y >= minBounds.y && position.y <= maxBounds.y;
}
}It is probably really messy, but this is one of my first games, so bare over with me. When the tower is in the scene as i start, it ofc works fine, and the refence works too. But when i go ahead and instantiate one, the refence dosent go through. I've thought about it alot, but can't seem to figure out how to do it.
Does anyone know how to do this?
https://redd.it/1gslz4p
@r_Unity3D
using System.Collections.Generic;
using UnityEngine;
public class Ghost : MonoBehaviour
{
public GameObject CastleTower1;
// Define the placement bounds (adjust these values to fit your specific area)
public Vector2 minBounds = new Vector2(-5.5f, -4.4f); // Bottom-left corner
public Vector2 maxBounds = new Vector2(5.5f, 4.5f); // Top-right corner
public CastleTower castleTower;
public bool towerPlaced;
private void Start()
{
towerPlaced = false;
}
// Update is called once per frame
void Update()
{
// Get the mouse position in world space
Vector3 mousPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousPos.z = 0;
// Clamp the position to stay within the defined bounds
mousPos.x = Mathf.Clamp(mousPos.x, minBounds.x, maxBounds.x);
mousPos.y = Mathf.Clamp(mousPos.y, minBounds.y, maxBounds.y);
// Update the ghost's position
transform.position = mousPos;
// Place the tower and destroy the ghost on left mouse click
if (Input.GetMouseButtonDown(0))
{
// Check if the position is within the allowed area (optional, as clamping already handles this)
if (IsWithinBounds(mousPos))
{
Instantiate(CastleTower1, transform.position, Quaternion.identity);
Destroy(gameObject);
towerPlaced = true;
}
}
}
bool IsWithinBounds(Vector3 position)
{
return position.x >= minBounds.x && position.x <= maxBounds.x &&
position.y >= minBounds.y && position.y <= maxBounds.y;
}
}It is probably really messy, but this is one of my first games, so bare over with me. When the tower is in the scene as i start, it ofc works fine, and the refence works too. But when i go ahead and instantiate one, the refence dosent go through. I've thought about it alot, but can't seem to figure out how to do it.
Does anyone know how to do this?
https://redd.it/1gslz4p
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
This media is not supported in your browser
VIEW IN TELEGRAM
It took us three years, but now everything is destructible in our upcoming game.
https://redd.it/1gsndkz
@r_Unity3D
https://redd.it/1gsndkz
@r_Unity3D
Looking for advice on where to start to create a "level maker" feature where players can make, export, and share 2D maps
I want to make a game where people can make and share levels, but I want the editor to be very automated and controlled so that players don't have to worry about things like explicitly setting lighting effects, collisions, interactive objects, etc, that they can just grab and drop tiles or objects into the editor and logic handles how the game world effects it.
https://redd.it/1gsovpg
@r_Unity3D
I want to make a game where people can make and share levels, but I want the editor to be very automated and controlled so that players don't have to worry about things like explicitly setting lighting effects, collisions, interactive objects, etc, that they can just grab and drop tiles or objects into the editor and logic handles how the game world effects it.
https://redd.it/1gsovpg
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Do you prefer the Old UI design (first image) or the New (second image) ?
https://redd.it/1gson3l
@r_Unity3D
https://redd.it/1gson3l
@r_Unity3D
Reddit
From the Unity2D community on Reddit: Do you prefer the Old UI design (first image) or the New (second image) ?
Explore this post and more from the Unity2D community