My math is not at strong level, so I need some help haha.
I am trying to get a value of 0 to 1.0 depending how far the center of my sphere is from the object.
If the object is, for example, 2m (I want this to be an exposed variable) from the centre of the sphere then returns 1.0. as it gets to the end of the sphere it returns 0.
The set up I have now is calculating the distance between these 2 things, but I don’t have control of how far from the centre the object is and the values returns 0 in the centre and 1.0 for the edges.
The collision sphere is attached to the player and the other object is just a static object in the scene.