How do I make an object bigger when I put the cursor on it? I’m making a card game, so I want my card to enlarge when I’m hovering it over; kind of like in Hearthstone. I’m pretty new to C#.
Thank you in advance
How do I make an object bigger when I put the cursor on it? I’m making a card game, so I want my card to enlarge when I’m hovering it over; kind of like in Hearthstone. I’m pretty new to C#.
Thank you in advance
Hi there,
place a collider on the card and use:
then you can simply increase its scale:
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
void Example()
{
// Widen the object by 0.1
transform.localScale += new Vector3(0.1F, 0, 0);
}
}