Answer the question
In order to leave comments, you need to log in
How to implement the correct application of the same physical force to the object based on pressing the screen?
I need to limit (by one on any axis) the value of the point of the click made relative to the point, I need this to always apply the same physical force to the object. For example, the point is at (0,0,0) , the click was made at position (2, 0, 1) and at (3, 0, 3) , respectively, the unit-limited values are (1, 0, 0.5) for the first click and (1, 0, 1) for the second one. And to get such values, I thought that I need to use the Vector3.Normalize function, but for example, for a point (3,0,3) the result will be (0.7, 0, 0.7), and I need the value to be (1,0,1). Here is a picture for better understanding
In fact, I need to lower the vector (well, or stretch the vector if the click position is (0.7, 0, 0.5) for example) to the blue cube. I solved it this way, I take the largest position and divide by myself, and divide the smallest position by the largest. For example, the click position is (7, 0, 13) so the required coordinates are (7/13, 0, 13/13) i.e. (0.54, 0, 1). Based on this, I have 2 questions, the 1st - what is normalization for? 2nd - is there a method in api unity to implement my task?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question