playMaker

Author Topic: Mathf clamp and moveTowards  (Read 1035 times)

sebaslive

  • Hero Member
  • *****
  • Posts: 539
    • View Profile
    • Frame Tale Studios
Mathf clamp and moveTowards
« on: April 09, 2014, 06:53:05 AM »
float scl = Mathf.Clamp01((spd - minZoomSpeed) / (maxZoomSpeed - minZoomSpeed));

A clamp that has an operator in it? I don't even know how this works.

cam.ZoomFactor = Mathf.MoveTowards(cam.ZoomFactor, targetZoomFactor, 0.2f * Time.deltaTime);

This one I can probably figure out how to create but in case someone already created a move towards based on floats?
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez