r/Unity3D – Telegram
r/Unity3D
260 subscribers
12.6K photos
15.5K videos
14 files
47.8K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
Isometric tilemap custom axis sorting problem

I'm trying to learn to create isometric tilemaps using Unity 6.1. In the documentation (https://docs.unity3d.com/6000.0/Documentation/Manual/tilemaps/work-with-tilemaps/isometric-tilemaps/create-isometric-tilemap.html) it says about Custom Axis Sorting "Go to Edit > Project Settings > Graphics > Camera Settings to set the Custom Axis settings." But under Graphics there are no Camera Settings. I have been googling a lot and watching videos where people do this but haven't been able to find anyone else with this problem.

Would really appreciate any help!

Edit: In the place other people have Camera Settings, I have the URP. So maybe it has something to do with that? I don't want to change it though if possible.

https://redd.it/1kdqijr
@r_Unity3D
Screen Shot Of my TD game
https://redd.it/1kdqbtk
@r_Unity3D
Need some help with 2D combat

This is my first ever game I'm making, and I've got a character with two animations, one for heavy attack and one for light attack. The code that implements them is below. The problem is I'm able to trigger the light attack animation whenever i press the correct input (left mouse click), but the heavy attack never triggers. I've mapped it to first to right mouse, then tried Q, but nothing triggered it. Please help me out


Combat Script:

public class PlayerCombat : MonoBehaviour
{
    public Animator anim;
    public float cooldown
heavyAttack = 2;
    public int heavyAttackMultiplier = 2;

    public Transform attackPoint;
    public float weaponRange = 1;
    public LayerMask enemyLayer;
    public int damage = 1;

    private float timer;

    private void Update(){
        if(timer>0){
            timer -= Time.deltaTime;
        }
    }
    public void LightAttack(){
        anim.SetBool("isLightAttacking", true);
    }

    public void HeavyAttack(){
        if(timer <= 0){
            anim.SetBool("isHeavyAttacking", true);
            timer = cooldownheavyAttack;
        }
        Debug.Log("heavy attack!");
    }

    public void DealDamage
LightAttack(){
        Collider2D enemies = Physics2D.OverlapCircleAll(attackPoint.position, weaponRange, enemyLayer);
        if(enemies.Length > 0){
            enemies0.GetComponent<EnemyHealth>().ChangeHealth(-damage);
        }
    }

    public void DealDamage
HeavyAttack(){
        Collider2D enemies = Physics2D.OverlapCircleAll(attackPoint.position, weaponRange, enemyLayer);
        if(enemies.Length > 0){
            enemies0.GetComponent<EnemyHealth>().ChangeHealth(-damage * heavyAttackMultiplier);
        }
    }

    public void FinishAttacking(){
        anim.SetBool("isLightAttacking", false);
        anim.SetBool("isHeavyAttacking", false);
    }
}

Main Player Control Script:

public class Knight
Script : MonoBehaviour
{
    public Rigidbody2D rb;
    public float moveSpeed;
    public bool facingRight = true;
    public Animator anim;
    public float jumpStrength;

    public Transform groundCheck;
    public float checkRadius = 0.1f;
    public LayerMask groundObjects;

    public PlayerCombat playerCombat;
   
   
    private bool isGrounded;
    private float moveDirection;
    private bool isJumping = false;
   

    void Update()
    {
        ProcessInputs();
        Animate();
        if(Input.GetButtonDown("Attack1")){
            playerCombat.LightAttack();
        }

        if(Input.GetButtonDown("Attack2")){
            player
Combat.HeavyAttack();
        }
    }

    void FixedUpdate(){
        CheckGrounded();
        Move();
    }

    private void Move(){
        rb.velocity = new Vector2(moveDirection moveSpeed, rb.velocity.y);
        if(isJumping && isGrounded){
            rb.velocity = Vector2.up
jumpStrength;
        }
        isJumping = false;
       
    }

    private void ProcessInputs(){
        moveDirection = Input.GetAxis("Horizontal");
        if(Input.GetKeyDown(KeyCode.Space)){
            isJumping = true;
        }
        anim.SetFloat("horizontal", Mathf.Abs(moveDirection));
        anim.SetBool("isJumping", isJumping);
    }

    private void Awake(){
        rb = GetComponent<Rigidbody2D>();
   
    }

    private void Animate(){
        if(moveDirection > 0 && !facingRight){
            FlipCharacter();
        }
        else if(moveDirection < 0 && facingRight){
            FlipCharacter();
        }
    }

    private void FlipCharacter(){
        facingRight = !facingRight;
   
    transform.Rotate(0f,180f,0f);
    }

    private void CheckGrounded()
    {
        isGrounded = Physics2D.OverlapCircle(groundCheck.position, checkRadius, groundObjects);
        anim.SetBool("isGrounded", isGrounded);
    }

     private void OnDrawGizmosSelected()
    {
        if (groundCheck != null)
        {
            Gizmos.color = Color.red;
            Gizmos.DrawWireSphere(groundCheck.position, checkRadius);  // Draw the radius for ground detection
        }
    }
   
}




https://redd.it/1kdqdhd
@r_Unity3D
My man was arrested by the police
https://redd.it/1kds3y5
@r_Unity3D
How long does it take you to build a 2D mobile game demo in Unity?

I’m planning to start building a 2D mobile game in Unity and I’m trying to get a realistic idea of how long it usually takes — from coming up with the idea, planning, prototyping, and finally having a playable demo.

Not talking about a full release — just something you can test, share with friends, or use to validate the concept.

Curious how it usually goes for you:

* How long does it take from idea to playable demo?
* How do you keep the scope manageable at the beginning?
* And how do you know when the demo is “ready” to show?

Would really appreciate any thoughts or tips from your experience. I’m trying to start off right and not burn out halfway.

https://redd.it/1kdvtu5
@r_Unity3D
The Steam page of our game, which we have been working on for a few months, is live.
https://redd.it/1kdwt3f
@r_Unity3D
Need an advice on how to approach wind creation for a 2D top down

I am a beginner dev and as a personal project I am trying to make a top down strategy game. I want to create a stationary compass that will show the current direction of the wind that is constantly changing. The wind direction will either speed up or slow down the ships. How can I approach this problem? I tried to find tutorials on this subject but I can't find anything.

Any direction or advice would be helpful!

https://redd.it/1ke1ali
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
Wall Fountain Tutorial using Shader Graph (Tut in Comments)

https://redd.it/1ke28c9
@r_Unity3D
Probably a newbie issue

Hey Guys

I just downloaded Unity 6 and I am facing an issue where my tiles renders wrong. I have searched the web for answers but couldn't find any. It is a 2D isometric game and i have made tilemaps and palettes with settings from diverse places on the internet. The assets are downloaded and 32x32

https://preview.redd.it/j1du1hpkomye1.png?width=680&format=png&auto=webp&s=3cf0841b31ecf3b079c4db364c139c94833e5b84



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