Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: jess84 on July 14, 2014, 06:38:38 PM
-
So I've got my Camera's FOV at 73, and I want to tween it over a couple of seconds to FOV 61.
I'm using HOTween to tween a float between those two values, and on the same state I'm using a Set Property (every frame) to update the FOV.
It works, however when doing this for the first time after loading the scene, for 1 frame the FOV is set to 0 and I get an error
(Screen position out of view frustum (screen pos 152.000000, 330.000000) (Camera rect 0 0 816 459)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
I've tried the different options, like Update/Late Update/Fixed Update, but it always sets it to 0 before the values I actually want!
I've checked before pressing my button, and the FOV target/start floats are correct. It just goes 0-73....tweening to 61.
If I then zoom back out (similar action, just with the Start/End values switched), and then zoom in again - there's no 0 used. And it works perfectly.
I've been fiddling with this for the last hour and it's driving me insane!
Any ideas?
-
Not familiar w/ the POV parameter. Perhaps FOV?
-
Oops, yes
-
Pretty strange that it doesn't do it going backwards, might be a glitch in the first time unity runs it, or something to do with postfx. Is it an Error or a Warning?
Have you thought about just changing it at the start of the scene, first thing, then going about business as usual?
-
It's an error, not a warning. (and you can visibly see the camera jump through the scenery to FOV 0).
I really don't know the solution here, and if I forced it at the start of the level, I'm still going to get those errors (spamming the analytics), and looking ugly. And it's not like I could disable the camera component, as I'll have an ugly blank transition.
But yeah, as I said, it only does this on first attempt after loading the scene. After it's happened, I can zoom in/out repeatedly with the FOV settings being within the correct 61-73 range every time. And most irritating is that I can see my float is 73 way before I actually attempt to zoom.
Maybe it's a problem with HOTween? I guess I'll just try Float Interpolate to see if it still occurs...
-
OK - It's a problem with HOTween - or the HOTween actions. (I have no idea which, or the ability to look into it further!)
I tested it with Float Interpolate, and it wasn't a problem
Which isn't great, as I'm now limited to just Linear or Ease In Out for this motion. :(
-
The HOTween guy says that this isn't a problem with the HOTween engine. Which leaves.... The PlayMaker actions.
Any idea who wrote them? Could they please have a look to see if they can identify the problem?
-
Hi,
I wrote them, I'll have a look, but it seems odd indeed, and likely unrelated to the action itself, Are you positive nothing else comes into play to control this FOV? Can you bump me next week if you haven't heard back? thanks :)
Bye,
Jean
-
I'm absolutely positive.
I've tested with HOTween Float and Interpolate Float actions that do exactly the same thing (start and end positions, time, linear) in my state - unchecking one, testing. Then stopping my game, changing to the other method, and retesting.
It happens on first running my scene every time with the HOTween action, and never with Float Interpolate.
-
Also note what I said above about the same problem happening with HOTween Vector 3 to scale an object. It disappears briefly because the scale is set to 0 for a frame initially. (again, doesn't happen with Vector3 Interpolate)
-
Hi,
Found the bug, I did not set the result value to the starting value when initialising.
Can you redownload the package from the thread and see if it solve the issues?
Bye,
Jean
-
Great, thanks!
From which thread?
And is this a fix which will cover all of the HOTween actions?
Thanks again!
-
Hi,
from the hotween thread itself:
http://hutonggames.com/playmakerforum/index.php?topic=2299.msg10104#msg10104
Yes, I have made the fix for all possible variables in that action.
Bye,
Jean
-
Just tested, and is fixed.
Thanks again.