unity – How to Flatten a Tilemap Collider 2d

I am having a very similar issue to this post here: How to flatten the collider for a tilemap?

I want to be able to make the tilemap collider flat and not the shape of the tiles. I followed the suggestion in the post above by editing the sprites and that gives me the offset that I needed but not a flat collider, it is still the shape of the sprite.

This is the tilemnap collider in the scene view:
enter image description here

This is the sprite edited as explained in the post above
enter image description here

Any help is appreciated, thank you in advance

animation – Unity – How do you have rigged clothing animate with a base model or control multiple SkinnedMeshRenderer with just one?

How do you have rigged clothing animate with a base model?

How do coalesce multiple skinned mesh renderers or have them all be controlled by just one?

Or, do you just have multiple animators for each SkinnedMeshRenderer (and there would be quite a number, for a character with a complex outfit that is modular)?

How would I go about making a game like clash of clans in unity

How would I go about making a game like clash of clans in unity

My aim is to make a game that is similar to clash of clans

Do I make an isometric game or use a 3d scene with an isometric camera

unity – How to restrict movement of GameObject inside the bounds of another GameObject?

I have a “Hand” GameObject controlled by a Leap Motion Controller. The Hand despite having RigidBody and Box Collider just seemingly moves with no regards to physics (transform translate movement I suppose). So it clips through other Rigidbody objects.

I’m trying to pseudo-introduce physics to it. I created a second GameObject “HandClone” (with Rigidbody and Box Collider) that copies the first Hand position but moves with actual physics. HandClone script:

   private void FixedUpdate()
    {
        rb.MovePosition(targetTransform.position);
        rb.MoveRotation(targetTransform.rotation);
    }

Now HandClone goes where Hand goes, and HandClone is successfully bumping into other objects.

However, when HandClone gets stopped by something, Hand still keeps moving past HandClone and clips into the other objects, like before.

Now I am thinking that the way to solve this is to constrict Hand‘s movements to the bounds of HandClone so that finally Hand will stop clipping through objects. But how can this be achieved, would that even work, and is there a better way? Will movement streamed from Leap Motion Controller even respond to scripts like that?

unity – I think I screwed up my Ubuntu gnome desktop

As for the last few months, my gnome desktop environment has been messed up(because I went to installing a ton of desktop environments such as kde and unity when I first got Ubuntu a year ago.). My cursor is the cursor from the breeze theme, I still got apps from the MATE and Unity desktop environments on my computer, the UbuntuMATE boot up screen from installing the MATE D.E., Unity login screen(I want to keep this screen though, and if I remember correctly, still have the entire kde plasma D.E. ready to be used, all despite me trying every single tutorial and purge command I could find. I’m desperate for a way to get fix this problem and getting my Ubuntu Gnome desktop to look normal(and yes, I’ve tried reinstalling the Ubuntu gnome desktop aswell as seeing if installing vanilla gnome works, none do.)

unity – How do I make night cycle like dino chrome?

i want to add a day/night system cycling to my runner game like the dino Chrome, the condition is when thescores reach 100 will be night then when 100 again will be day.

so I actually already try with this but nothing changed :

     if (_GameManager.instance.score % 100 == 0)
                {
                    fadeToBlack = !fadeFromBlack;

                    if (fadeToBlack)
                    {
                        cam.backgroundColor = new Color(Mathf.MoveTowards(cam.backgroundColor.r, 1f, fadeSpeed * Time.deltaTime), Mathf.MoveTowards(cam.backgroundColor.g, 1f, fadeSpeed * Time.deltaTime), Mathf.MoveTowards(cam.backgroundColor.b, 1f, fadeSpeed * Time.deltaTime), cam.backgroundColor.a);

                    }

                    if (fadeFromBlack)
                    {
                        cam.backgroundColor = new Color(Mathf.MoveTowards(cam.backgroundColor.r, 255f, fadeSpeed * Time.deltaTime), Mathf.MoveTowards(cam.backgroundColor.g, 255f, fadeSpeed * Time.deltaTime), Mathf.MoveTowards(cam.backgroundColor.b, 255f, fadeSpeed * Time.deltaTime), cam.backgroundColor.a);

                    }
                }

like that, I want to change all game object color via script with smooth, for now I just want to apply to camera background.

unity – Combining Rotation, Jump, and Crouch Animations with 2D Blend Tree

I have a 2D Freeform Blend Tree that I’m using to animate a character that can currently:

  • Walk / Sprint Forward
  • Walk / Sprint Backward
  • Strafe / Sprint Strafe Left
  • Strafe / Sprint Strafe Right
  • Idle

My goal is to add in rotation, jump, crouch, and “firing when walking” animations.

In just dealing with turning or even jumping for now, I understand how to handle and call the animations in the code, but not sure of how it should be set up in the animator.

Do I transition to rotation/jump animations on the base layer? I’m reserved doing it this way because I lose the ability to blend and take advantage of those transitions.
Can I build it into my current 2D blend tree even though the blend tree is only X and Z axis?

enter image description here

public class twoDControllerMovement : MonoBehaviour
{
    Animator animator;
    public CharacterController controller;

    (SerializeField) private float walkSpeed = 12.0f;
    (SerializeField) private float strafeSpeed = 10.0f;
    (SerializeField) private float sprintMultipler = 2.0f;
    (SerializeField) private float rotationSpeed = 120.0f;

    // Start is called before the first frame update
    void Start()
    {
        animator = GetComponent<Animator>();
        controller = GetComponent<CharacterController>();
    }

    // Update is called once per frame
    void Update()
    {

        // handle sprint
        float currentWalkSpeed = walkSpeed;
        float currentStrafeSpeed = strafeSpeed;
        bool runPressed = false;

        // handle shift
        if (Input.GetKey(KeyCode.LeftShift))
        {
            currentWalkSpeed = walkSpeed * sprintMultipler;
            currentStrafeSpeed = strafeSpeed * sprintMultipler;
            runPressed = true;
        }

        // calculate movement
        float strafe = Input.GetAxis("Strafe") * currentStrafeSpeed * Time.deltaTime;
        float translation = Input.GetAxis("Vertical") * currentWalkSpeed * Time.deltaTime;
        float rotation = Input.GetAxis("Horizontal") * rotationSpeed * Time.deltaTime;

        // execute movement
        transform.Translate(strafe, 0f, translation);
        transform.Rotate(0, rotation, 0f);

        // handle movement animations
        if (runPressed) {
            animator.SetFloat("VelocityZ", Input.GetAxis("Vertical") * sprintMultipler);
            animator.SetFloat("VelocityX", Input.GetAxis("Strafe") * sprintMultipler);
        } else 
        {
            animator.SetFloat("VelocityZ", Input.GetAxis("Vertical"));
            animator.SetFloat("VelocityX", Input.GetAxis("Strafe"));
        }

        // handle roration animations
        if (Input.GetAxis("Horizontal") < 0.1f)
        {
            //Debug.Log(Input.GetAxis("Horizontal"));
        } else if (Input.GetAxis("Horizontal") > 0.1f)
        {
            //Debug.Log(Input.GetAxis("Horizontal"));
        }

    }
}

Also open to any feedback on improving the code above, my goal is as small and clean as possible! I do have a slight delay in animations starting when switching directions that I have to work out at some point and would eventually.

unity – What is the standard practice for animating motion — move character or not move character?

I’ve downloaded a bunch of (free) 3d warriors with animations. I’ve noticed for about 25% of them, the ‘run’ animation physically moves the character forward in the z direction. For the other 75%, the animation just loops with the characters feet moving etc., but does so in place, without changing the character’s physical location.

I could fix this by:
1.) Manually updating the transform in code for this 75%, to physically move the character
2.) Alter the animation by re-recording it, with a positive z value at the end (when I did this it caused the character to shift really far away the rest of the units, probably something to do with local space vs world space I haven’t figured out yet).

But before I go too far down this rabbit hole, I wonder if there is any kind of standard? In the general case, are ‘run’ / ‘walk’ animations supposed to move the character themselves, or is it up to the coder to manually update the transform while the legs move and arms swing in place? Is one approach objectively better than the other, or maybe it depends on the use case? If so, what are the drawbacks of each? I know nothing about animation, so I don’t want to break convention (if there is one).

unity – The correct way to create radial particle system

I want to create a particle system. I have 3 different images of same size 50×50:

enter image description here
enter image description here
enter image description here

The goal is to make a system of particles flying around in a circle so that:

  • The particles will be directed as they move
  • The particles must be of the same size
  • The particle system must include a few types of textures.

Here’s what I have done:

enter image description here

This works ok. All I need is to make it with several textures. But when I simple change one texture to another one (once again, they are the same size), I see something like this:

enter image description here

What is wrong here? Second texture has the same size and the size angle

How To make A Custom Backend Service for Unity Addressables to send bundles to the clients?

There are lots of cloud services on which you can host your addressable bundles, but I need to resolve the bundles on my own backend service (like ASP, .NET Core, etc).

There is a request scheme for Unity request in addressable settings:
enter image description here

Unity generates 3 files for each bundle build:

enter image description here

I use this functions to resolve remote dependencies on bundle downloader scene:

  preloadOp = Addressables.DownloadDependenciesAsync("remote");

I need to to know if I should resolve Unity builtin request to get my bundle properly. What should be returned from my server? do i need a unity editor or build as a service on my server or there are other ways?