Why in some games i see an expression type: size.width/2 or mouse.position.x/2?
![Danix1996](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
What is the function of divide the size or position?
Best Answer
-
lukey5227 Posts: 111
Everything has uses. If somebody needs to add something between the left side of the screen and the mouse, they'll use this to find the center point. You can also find the left or right side by adding or subtracting from the center point the width/2.
Answers
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I pay him 20 $
And "self.width/2" is not a function that the expression ''/" is the function and it just means to divide the values
You really need to be more specific about what you want to do or learn before where going to be able to help you. For Example…. What did you try this with. Change Attribute, Interpolate Attribute, Constrain Attribute, Etc…. ?
What are you trying to accomplish? We cannot read minds so it is imperative that you are as descriptive as possible.