#How to make a object point at you in CV2
1 messages · Page 1 of 1 (latest)
Subtract the position of the player (top) and the position of the bar (bottom). This gives you a vector that is looking at the player. Vector3 Split that vector and use a Vector3 Create to connect the X to X and Z to Z (Leave the Y alone). Then just set the rotation
Is there a way to add smoothing like in the look at gizmo in cv1?
Lerp and Slerp would be best for that. 👍
2 Questions what is Slerp and what would the progress be, what math would I need to calculate that
I still have 0 clue how to do this 
@lusty isle
Well, they are essentially the same, just one is Linear and goes directly from A to B, but the other is Spherical and goes directly from A to B however also "rotates" around whilst doing so
I'll try and draw a quick example if someone can send an image of a top down view of an object or something
Oh also how would I calculate the progress with vectors my math kinda sucks
The progress itself? Use Inverse Lerp if you have A and B and current P
How to get the progress you want for this situation? You would get the Distance between your current rotation and the end rotation, then Divide 1 by that to get the reciprocal (or Power to -1), then Multiply that by your DeltaTime and RotationSpeed.
This would mean that no matter how far or close the rotations are, it will always be the same speed as its Distance is essentially cancelled out.