Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Unity Dev. tricks

A topic by Infinity xos created Dec 07, 2016 Views: 327
Viewing posts 1 to 1

On Unity you can choose for an object to do a certain function by writing the code out for it, but If you want to be lazy like me you could create an animator to do almost everything you want. You will just need to set it up like this:

//c#

public Animator ani;

void whatever(){

if(Input.GetKey(KeyCode.Whatever)){

ani.SetFloat("whatever", whatever);

}

}

Another trick is giving 2 object rigidbodies, one you can move the other which can't move anywhere. Then put another object (with or without a rigidbody) that will move by itself inside the object that can't move. After after that when you move your first object ontop of the second it will auto bounce.

Help Support Me Please:

https://aiplexprogramming.itch.io/