@Huppah @Matberseris
This example uses a Trigger but the same should work in any collision event.
But if I’m understanding the question, and there may be other ways to solve it but
[RequireComponent(typeof(Collider))]
[SerializeField]
float defaultBounceValue;
public GameObject otherCertainObject;
void Start()
{
defaultBounceValue = GetComponent<Collider>().material.bounciness;
//or
defaultBounceValue = otherCertainObject.GetComponent<Collider>().material.bounciness;
}
void OnTriggerStay(Collider col)
{
//Depending on how you have it set up
if (col.gameObject.name == "Certain Object" || col.gameObject.tag == "Certain Object")
{
col.GetComponent<Collider>().material.bounciness = 0f;
//or
gameObject.GetComponent<Collider>().material.bounciness = 0f;
}
}
void OnTriggerExit(Collider col)
{
GetComponent<Collider>().material.bounciness = defaultBounceValue;
}
Not thtat i know of, but you can split the text into words, and then set a limit of how many characters can go into a line, count how many character the words have and based on the limit dived them into the lines.
– Pneumectomy