playMaker

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

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Mathf clamp and moveTowards
« on: April 09, 2014, 09: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