Reverse Magnitude Function
ichooicedanotherbrodamncmon!!1
Member Posts: 22
I created 2 attributes called finger x,finger y and constrain them to self.position.x and self.position.y (finger). I created an actor and I created a magnitude function in a constrain attribute >> magnitude(finger.x-self.position.x,finger.y-self.position.y) so it records the distance between actor and the finger actor. If the finger actor goes far the actor grows, if the finger comes the actor dwindles. So, How can I make actor grow when finger comes closer and make actor dwindle when the finger goes far. ?
Comments
It would be something like:
(sceneWidth/2) - magnitude
Yeah, I'd do it like this too, just start with a base value and subtract the magnitude, also min and max might be useful here to limit the largest and smallest sizes the actor is allowed to shrink/grow to.
Attached is a quick demo file:
thank you guys