Quantcast
Channel: Questions in topic: "mass"
Viewing all articles
Browse latest Browse all 157

Attaching a "Mass" variable to all or most gameObjects and how to access them

$
0
0
So I'm making a simple game where you move around and eat things smaller than you. I would like to attach a simple variable to game objects to give them a "mass" and check to see that if they are smaller than you then you can eat them etc. But since each object will have a different mass, how can I add a simple script that I can change depending on who it is on? And then I need to check the players mass against the gameObjects mass. You don't have to write the script yourself unless I am overcomplicating it, I have no problem reading tutorials I just don't know where to begin. Thanks in advance!

Viewing all articles
Browse latest Browse all 157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>