Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: cmvrgr on September 10, 2013, 06:37:30 PM
-
I am trying to make a zoom function of a camera by clicking the right mouse button and them moving the mouse over the Y axis . The problem is that with fov function is not working.
Any ideas ? Thanks in advance ...
-
The below setup works- the listen state just has a 'Get mouse button down'
-
Thats very nice thanks... :)
do you know how to limit it to min - max to avoid super zoom / out ?
I tried float clamp but then mouse pointer works only on a limited area of the screen (for example from pixels 90 to 150). If the mouse pointer (y axis) is over 150 pixel or less tan 90 pixel is not working.
Any ideas ?
-
Hi,
you need to have a bit more work here. Because you need to constraint the camera position. So get the distance between the target and the camera, that's the float you need to watch. And if it goes out of bound, simply stop affecting the zoom. That's how I do it.
if you want to use clamping, then you need to get that z distance, clamp it, and then reassign it to the camera z position.
Bye,
Jean