Advertisement
ShadowTzu

Camera Lerp

Oct 2nd, 2014
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.55 KB | None | 0 0
  1. ''' <summary>
  2. ''' Camera Lerp
  3. ''' </summary>
  4. ''' <param name="Camera">Camera Position</param>
  5. ''' <param name="Target">Target Position</param>
  6. ''' <param name="Speed">Moving speed (5)</param>
  7. ''' <param name="Deltatime">time in seconds (0.xx)</param>
  8. ''' <returns></returns>
  9. ''' <remarks></remarks>
  10. Public Shared Function Camera_Lerp(Camera As Vector2, Target As Vector2, Speed As Single, Deltatime As Single) As Vector2
  11.     Dim mBlend As Single = Deltatime * Speed
  12.     mBlend = Math.Min(mBlend, 1.0F)
  13.     Return Vector2.Lerp(Camera, Target, mBlend)
  14. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement