Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Camera Controller Release

Discussion in 'Assets and Asset Store' started by Tryz, Dec 21, 2013.

  1. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Wow great!! Your great asset should be bought by Unity3D. Goodjob!!.
     
    Last edited: Sep 7, 2017
    Tryz likes this.
  2. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hello Tim, I been using Camera controller, I was mainly using the default settings, when you first apply the camera controller.. anyways when aiming ..I notice after I release right click, if I'm side stepping at the same time by holding down left or right down arrow it keeps me in aim mode still.. for a few .. I didn't edit any inputs either.

    Kinda strange issue.

    I'm using updated Camera Controller with Unity 5.6.3.

    Edit: It did it with W,A,S,D actually it would stay zoomed no matter what when I released left click.

    So I went into motion Controller, I ticked off, rotate with Input, under the walk run rotate.

    This corrected it. Not 100% if this is intended? works like it should, when zooming, I release works fine, and I can still hold down any of those buttons.. works fine when I did this.


    I had an old version of MC, I updated it. before all of this.. So I decided to remove the component from my character and re-add a new one, seems to be all better now. Even some of my character movements where acting up.
     
    Last edited: Sep 7, 2017
  3. strife77

    strife77

    Joined:
    May 15, 2014
    Posts:
    29
    Just a quick question. All I need is a simple fade transition between two stationary cameras in my scene for use in a cinematic intro (no player input). Would this be good for that? It seems like a comprehensive asset, and I'd like to invest a little more for this vs. a basic camera transitions asset that can't do much else but need to know first if it can handle something like this.

    My main comparison is the 'Camera Transitions' asset here in the store. Please let me know if this can do something similar.

    Thanks!
     
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Not to distract from Camera Controller ... but wouldn't you use Unity's Timeline for this?
     
  5. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    That's odd. It definitely doesn't sound right. Once I get the chance, I'll try to duplicate it and make sure things are working right.

    I'm just wondering if there was an odd combination of settings I haven't done before.
     
  6. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @strife77

    The CC won't fade one view out and another view in. I think @hopeful may be right with the Timeline.

    If you want the camera to smoothly move from one point to another, it will do that. It just won't fade out and fade in.
     
    strife77 likes this.
  7. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I left it at the default for CC, I didn't change anything. only thing I change was the view. nothing more. I set it to third person and noticed that when aiming, and holding down at the same time I was aiming, either W, A, S, D, release right click and it didn't zoom back, I notice in CC, it did change as it should of with the right motor being enabled which throw me off. But I was still holding either W, A S or D. and it would stay zoomed in. after i released it would snap back. It was a very wierd issue. never seen it myself. I was using it in a new scene for my mobile game, as I wasn't using CC before with it.. By the way this was using PC inputs, as I didn't add anything else to the project yet.
     
    Tryz likes this.
  8. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    If your looking to fade in and out, you can do what Hopeful said, you also can use a tween , an an alpha to do this as well. Very simple to do. I use NGUI, to do my transitions for stuff like that all the time. any tween engine can.
     
  9. strife77

    strife77

    Joined:
    May 15, 2014
    Posts:
    29
    Thanks for the replies.

    I'm on 5.5.0 for my current project so can't use Unity's Timeline.

    It all worked out, though. Pegasus allowed me to put together an opening cinematic better than I was hoping for.
     
    Tryz likes this.
  10. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    Any chance you would add functionality to mimic the kind of camera used in the new XCOM games? As in X degrees rotation vs free rotation with the slight zoom in effect while rotating, and that smooth zoom in/out feel.
    Also, this might be out of scope for this asset, but a detect blocking objects and see through them effect would also be awesome :)
     
  11. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I think both of those are fair requests.

    I'm in the middle of some changes to the Motion Controller, documentation update, and a motion pack. So, once I'm done with all that I'll crack open XCOM 2 and see what I can do. It just may be a while.... but I like the ideas.
     
    Kybernesis likes this.
  12. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    Awesomesauce! Looking forward to test it out :D
     
  13. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hey, I integrated this last weekend. There are a couple of tweaks I made. Can we offer back changes?
     
    hopeful and Tryz like this.
  14. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Sure. Send them to tim@ootii.com. I'll take a look.
     
  15. ayk

    ayk

    Joined:
    Nov 14, 2013
    Posts:
    58
    Hey Tim,

    Is there any way to rotate the MOBA camera? The prototype I'm working on basically looks down on a diorama type scene, and I'd love to be able to pan and rotate around it. I'm not using an anchor because the game itself doesn't have a main character per se. Instead, you click on things in the scene to interact with them. I'm finding the MOBA camera to be almost perfect, but I'd love to be able to rotate by holding down the right mouse button.
     
  16. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi @ayk ,

    Unfortunately, no. I modeled that camera motor off of Dota2 (which doesn't rotate).

    That said, copying the motor and adding rotation shouldn't be too bad. You just have to decide if you're rotating around the camera's position or the camera's view target's position.

    I'll add rotating to my to-do list, but I'm in the middle of another big project right now. So, I won't get to it for at least a month. :(
     
  17. ayk

    ayk

    Joined:
    Nov 14, 2013
    Posts:
    58
    Sweet. I don't mind waiting, I'm not in an urgent need of rotation. In the meantime, I'll keep working on other parts of the prototype :)
     
    Tryz likes this.
  18. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    nevermind, im a donkey


    Thank you,
    Nathan
     
    Tryz likes this.
  19. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hahaha... I was just reading your email. Looks like you found it. :)
     
  20. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    Hi, how does your asset integrates with unity Cinemachine ?

    Thanks
     
  21. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Unfortunately, I don't know.

    From what I've seen, it seems that Cinemachine is more of a cinematic and cut-scene solution while the CC is more of a player view and game-play solution. I'm sure there's middle ground and ways we can integrate. I just haven't played with Cinemachine to give you an honest answer.
     
    Last edited: Oct 24, 2017
    Whatever560 likes this.
  22. Arctous

    Arctous

    Joined:
    Aug 25, 2014
    Posts:
    26
    Hello! I just came across your asset and am super-excited about the features and community feedback. My app has two distinct camera modes: 1) Character mode (for which the CameraController is ideally suited) and 2) Overview mode (think of a sports Skycam). I've watched your Asset Store tutorial and scanned the documentation. I do not believe that the game-object structure and design of my Overview mode would allow me to play nicely in the sandbox with your CameraController (neither would be happy about the other's influence). So, I am thinking of simply having two cameras with "rigs", and only one camera/rig being turned on at a time. Would the CameraController have any issues with being activated/deactivated so that another camera can perform rendering? Would there be any positional or visual anomalies when being activated/deactivated? Do you have any advice? As a side-note, this is for mobile.
    Thanks in advance for your time!
     
    Tryz likes this.
  23. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi. :)

    No. There won't be any issue disabling the CC and then re-enabling it. Sharing the camera duties won't be a problem.

    Depending on your how Overview mode works, you may be able to create a custom motor and use it within the CC, but you don't have to.

    There won't be any visual anomalies. The only thing I can think of is when you're re-enabling the CC it will ensure the camera fits the limits of the current motor. So, if you stopped the CC and moved the camera 100 units to the left. When you re-enable the CC it will pull the camera (and view) back. But, that would be expected.

    I believe you'll be fine. If you find there is an issue, I'm happy to work through it with you. :)
     
  24. Arctous

    Arctous

    Joined:
    Aug 25, 2014
    Posts:
    26
    Great! Thanks for the repply! I was hoping that would be the case.
    That's a very interesting idea. My camera implementation is modular and would lend itself to migration. I'll review the structure of the motors to see how much work it would take.
     
    Tryz likes this.
  25. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Hi,

    I have a quick question. I'm using the Spline Motor to move my camera along the spline. I would like to in once case have the camera pointing forward along the spline and I can achieve this with Look To Path, but I would like to control the down rotation of the camera and it seems that this rotation is hardwired to the path itself. Is there a way to override this?

    Another scenario would be having the camera pointing back along the path, as it moves along the path. So in second scenario it would be like a staring through a back window of a moving bus, or like looking into a rearview mirror. Do you have any suggestions?

    Also, if I only want to use the camera to move along the spline and then transition to my own camera do I really need an input source for the camera controller, since in this case the spline data will be the input?

    Thank You.
    Regards.
     
    Last edited: Oct 31, 2017
  26. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    You could create an invisible Game Object that represents the direction to look at. Then, you have complete control over where the camera looks as it moves along the path. You would just have to add logic that moves the object when and where you want it.

    With the Spline Motor you can set a "look at target". Check the "Look To Anchor" checkbox and then uncheck the "Use Rig Anchor" checkbox. Now you can set a different "Anchor" (ie your invisible object).

    Another trick you can do is add a transition motor at the end ("Activate End Motor"). This would smooth the camera from looking at your temporary anchor and back to the character (if needed).
     
  27. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Good day. Somewhy when i set camera`s Anchor at runtime it gets cameraRig turned 180 degrees on Y axis. Is there an easy way to fix this behaviour?
    Oddly enough this behaviour presists only on 3rd person follow motor, 3rd person fixed one works pretty fine when setting anchor at runtime without 180 degree turn.
     
    Last edited: Oct 31, 2017
  28. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Thanks. What I ended up doing is actually animating an empty object instead of a camera and then attached the camera to that empty object with the camera facing 180 back.

    By the way, if I'm only using Spline motor do I still need an Input Source?
     
    Tryz likes this.
  29. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I don't think so. The rest of the CC shouldn't care.
     
  30. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi @Silvermurk , If you can email tim@ootii.com a copy of your Unity Order ID for the CC I'll take a look.

    The issue doesn't sound familiar, but I'll check. Thanks.
     
  31. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52
  32. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    That is something you would have to do yourself. The CC does not have that functionality.
     
  33. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52
    thanks a lot.
     
    Tryz likes this.
  34. OreoSplitter

    OreoSplitter

    Joined:
    Oct 21, 2017
    Posts:
    33
    I've looked at a youtube video showing this off. Can the third person camera have the pivot point between the players position and the camera? If using wasd to move (no mouse camera movement available) the camera looks to slow watching the character run a far enough to the left or right to finally see what else is around. Changing the pivot would solve this.
    I'm new to all of this so not sure if this taken care of by unity or your camera.

    Outside of setting the pivot can we not have the camera always be X distance from the character. In other word always follow if distance is greater then X but just sit there and rotate focusing on the character if player is still within ok range but move camera position itself. Not that important but would be nice to not have the camera moving the entire view with every inch the player moves. Only when necessary, as in player is getting to far away or to close to the camera does it move with or away from the character. All the while it rotates following the character on that pivot point between.

    Man I hope that even made sense.
     
    Last edited: Nov 6, 2017
  35. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    You can change the pivot point (I call it the "anchor") by adjusting the anchor offsets. In the case of the 3rd person motors, you can also set an X-axis offset separately for the motor. This is good for creating the adventure game "shoulder offset" you see in Tomb Raider, Uncharted, etc.

    I talk about this in the documentation (pg 17):
    http://www.ootii.com/Unity/CameraController/CCUsersGuide.pdf




    Another thing you can do for the delay you talked about is use a "Camera Anchor" component. I added this concept recently and have an example "Base Camera Anchor" component you can try.

    Think of the "Camera Anchor" as a middle man between your character and the CC. You add a separate Game Object to the scene and add my Base Camera Anchor component (or a custom one you create) to it .

    In the CC, the "anchor" is no longer the character, but this new game object. The CC follows the Base Camera Anchor which follows the character.

    By default, my Base Camera Anchor follows the character. So, there's no difference. However, we can tell the Base Camera Anchor to stop following the character, move to a new spot, etc. In your case, you could create a new camera anchor to have the delay you're talking about.

    I did it this way so that developers can have complete control over the delay, drag, offset, etc without having to modify the CC directly. Instead, they can customize a small component.


    After I finish the project I'm on, I plan on doing some different examples and add the features you're talking about. However, you don't have to wait for me. Just create a custom Camera Anchor how you want.

    I hope that makes sense.
     
    BackwoodsGaming likes this.
  36. OreoSplitter

    OreoSplitter

    Joined:
    Oct 21, 2017
    Posts:
    33
    It makes a lot of sense. Thanks. I'm glad to see just how flexible this is. I'll buy this later on today. For setting the range for the base camera anchor not to follow, any ideas where I should look for c# code that is similar I that can look at and make it here?
    I think most people are not trying to write code where an object does not follow. :)

    Good luck on your project.
     
  37. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hahaha...

    I did something similar a while back with NPCs following the PC. Something you have to think about is the start-stop-start-stop... that becomes ugly real quick. It occurs when the follower is just outside of the stop distance and then moves inside the stop distance (while the target is moving).

    You have to have some kind of smoothing or edging, but having two distance values helps too as it creates a buffer zone. No raw code to share yet, but you get the idea.
     
  38. brentnichols

    brentnichols

    Joined:
    Apr 19, 2017
    Posts:
    1
    Using Camera Controller (with Motion Controller) in "3rd Person Follow". Right click instantly rotates in the direction as expected. On left click, my character slowly turns whichever way im rotating the camera around it. If I turn the camera 180, the character will rotate about 80 degrees. Is this intended? I only have your assets and UMA2 imports into a test scene to confirm its behavior.
     
  39. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    It really depends on the motions you have active and the properties that are checked.

    Take Basic Idle for example:

    If I check "Rotate With Camera", the character will rotate to the direction of the camera when the Input Source's View Activator property is held.

    If I check "Rotate With View Input", the character will rotate when the Input Source's View Activator property is held. But, this rotation is based on the speed set and has nothing to do with the camera.

    Other motion properties would have similar properties.

    If you'll email tim@ootii.com your Unity Order ID and the motion setup you have (including properties for the active motion), I can help more.
     
  40. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    277
    Hey Tryz, just a heads up that the video at the top of the first post is broken.

    edit: A couple broken images at the top of the Actor Controller first post too. Broken image and videos in first post of Motion Controller too.
     
    Last edited: Nov 19, 2017
  41. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Thanks @Obsurveyor . Not sure why they are gone, but I'll check it out.
     
  42. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    251
    Hi
    how can i fix this?(shake)
     
  43. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @claudius_I ,

    The video doesn't show me much of your setup, but...

    I think it's because your character's animation is having him bounce up and down. The Camera Controller simply follows the transform that you set as the anchor. So, the camera is bouncing up and down. You may want to check on your animation and remove the vertical root-motion.

    I also see that you have an error. That could be an issue too as it will stop code from processing. So, the Camera Controller may not be running it's full cycle.

    If you'll email your Unity Order ID to tim@ootii.com and send me some pictures of your setup: Camera Controller motor, character controller, etc. I may be able to help more.

    [EDIT]
    For anyone following along, the issue was that his character had deactivated smooth physics.
     
    Last edited: Nov 20, 2017
    hopeful likes this.
  44. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    So I'm having an issue where when the framerate in the game is very high the camera look zips around and if I adjust the value for a nice computer then when I play it on a bad computer the look is very slow and especially slow when I'm running the game in the editor. Is there a way to link or unlink the look speed with the framerate?

    Also the camera works just fine when using the cinemachine and transitioning between the cameras.
     
  45. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    It should be framerate independent. I did a bunch of testing on that early on. Let me test somethings and I'll get back (probably tomorrow).
     
  46. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm not seeing this.

    Unfortunately I don't have multiple computers to try it on, but I use this tool to force the frame rates:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System;
    4.  
    5. namespace com.ootii.Tools
    6. {
    7.     /// <summary>
    8.     /// Used to forcefully slow down the frame rate. Used for testing to
    9.     /// ensure apps and code can handle slow computers.
    10.     /// </summary>
    11.     public class FrameLimiter : MonoBehaviour
    12.     {
    13.         public int TargetFPS = 30;
    14.  
    15.         /// <summary>
    16.         /// When we start, allow the renderer to go as fast as possible
    17.         /// </summary>
    18.         void Awake()
    19.         {
    20.             Application.targetFrameRate = -1;
    21.             QualitySettings.vSyncCount = 0;
    22.         }
    23.  
    24.         /// <summary>
    25.         /// During the update, suck up as much time as we need to
    26.         /// </summary>
    27.         void Update()
    28.         {
    29.             if (TargetFPS <= 0) { return; }
    30.  
    31.             double lElapsedTime;
    32.             double lDelay = 1f / TargetFPS;
    33.             long lStartTicks = DateTime.Now.Ticks;
    34.  
    35.             while (true)
    36.             {
    37.                 lElapsedTime = TimeSpan.FromTicks(DateTime.Now.Ticks - lStartTicks).TotalSeconds;
    38.                 if (lElapsedTime >= lDelay) { break; }
    39.             }
    40.         }
    41.     }
    42. }
    43.  

    By putting this into the scene, I can set the frame rate free (1,000+ FPS) or lock it down (10 FPS). As I test the rotation using the demo_3rd_Person_Style scene and the 3rd Person Fixed motor I'm getting the same rotations for the same mouse movement regardless of the FPS. This should mimic different machine speeds.

    Is there anything you can tell me about your project or setup?

    Maybe try setting the Smoothing value to 0 and see if that makes a difference. It's not for me, but I'm curious what you see.

    Feel free to send screenshots of settings to tim@ootii.com. That may help.
     
    BackwoodsGaming likes this.
  47. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    So the camera rotation isn't based on the mouse, it's based on controller input.
    Here's a video where I increase the framerate using your frame limiter tool. You can see how slow it goes at low framerate and how fast it goes at high framerate. I would like this to be consistent otherwise players will have a very different feel to their game depending on how fast the game runs.


    The code is below.
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using Goon;
    4.  
    5. namespace com.ootii.Input
    6. {
    7.     /// <summary>
    8.     /// Base class used to abstract how input is retrieved. Inherit from this class
    9.     /// and then implement the function as needed in order to allow other objects
    10.     /// to process input using your input component.
    11.     /// </summary>
    12.     [AddComponentMenu("ootii/Input Sources/InControl Input Source")]
    13.     public class InControlInputSource : UnityInputSource
    14.     {
    15.         /// <summary>
    16.         /// Retrieves horizontal movement from the the input
    17.         /// </summary>
    18.         public override float MovementX
    19.         {
    20.             get
    21.             {
    22.                 if (!_IsEnabled) { return 0f; }
    23.  
    24.                 if (ObjectReferences.playerController.isRidingBike)
    25.                 { return 0f; }
    26.  
    27.                 // TODO: Code for the left joystick goes here. I don't own ET5, but it might looks something like this
    28.                 //return ETCInput.GetAxis("Horizontal");
    29.                 return PlayerActions.Move.X;
    30.             }
    31.         }
    32.  
    33.         /// <summary>
    34.         /// Retrieves vertical movement from the the input
    35.         /// </summary>
    36.         public override float MovementY
    37.         {
    38.             get
    39.             {
    40.                 if (!_IsEnabled) { return 0f; }
    41.                 if (ObjectReferences.playerController.isRidingBike)
    42.                 { return 0f; }
    43.  
    44.                 // TODO: Code for the left joystick goes here. I don't own ET5, but it might looks something like this
    45.                 //return ETCInput.GetAxis("Vertical");
    46.                 return PlayerActions.Move.Y;
    47.             }
    48.         }
    49.  
    50.         /// <summary>
    51.         /// Retrieves horizontal view movement from the the input
    52.         /// </summary>
    53.         public override float ViewX
    54.         {
    55.             get
    56.             {
    57.                 if (!_IsEnabled) { return 0f; }
    58.  
    59.                 if(ObjectReferences.playerController.isCameraLocked || GameStateManager.currentGameState == GameStateManager.GameState.PauseMenu)
    60.                 {
    61.                     return 0;
    62.                 }
    63.                 // TODO: Code for the left joystick goes here. I don't own ET5, but it might looks something like this
    64.                 //return ETCInput.GetAxis("Mouse X");
    65.                 return PlayerActions.Look.X;
    66.             }
    67.         }
    68.  
    69.         /// <summary>
    70.         /// Retrieves vertical view movement from the the input
    71.         /// </summary>
    72.         public override float ViewY
    73.         {
    74.             get
    75.             {
    76.                 if (!_IsEnabled) { return 0f; }
    77.  
    78.                 if (ObjectReferences.playerController.isCameraLocked || GameStateManager.currentGameState == GameStateManager.GameState.PauseMenu)
    79.                 {
    80.                     return 0;
    81.                 }
    82.                 // TODO: Code for the left joystick goes here. I don't own ET5, but it might looks something like this
    83.                 //return ETCInput.GetAxis("Mouse Y");
    84.                 return PlayerActions.Look.Y;
    85.             }
    86.         }
    87.  
    88.         public override bool IsViewingActivated
    89.         {
    90.             get
    91.             {
    92.                 return true;
    93.             }
    94.         }
    95.  
    96.         /// <summary>
    97.         /// Test if a specific action is pressed this frame.
    98.         /// </summary>
    99.         /// <param name="rAction">Action to test for</param>
    100.         /// <returns>Boolean that determines if the action just took place</returns>
    101.         public override bool IsJustPressed(string rAction)
    102.         {
    103.             if (!_IsEnabled) { return false; }
    104.  
    105.             // TODO: Code for the button here. I don't own ET5, but it might looks something like this
    106.             //return ETCInput.GetButtonDown(rAction);
    107.             return false;
    108.         }
    109.  
    110.         /// <summary>
    111.         /// Test if a specific action is pressed. This is used for continuous checking.
    112.         /// </summary>
    113.         /// <param name="rAction">Action to test for</param>
    114.         /// <returns>Boolean that determines if the action is taking place</returns>
    115.         public override bool IsPressed(string rAction)
    116.         {
    117.             if (!_IsEnabled) { return false; }
    118.  
    119.             // TODO: Code for the button here. I don't own ET5, but it might looks something like this
    120.             //return ETCInput.GetButton(rAction);
    121.             return false;
    122.         }
    123.  
    124.         /// <summary>
    125.         /// Test if a specific action is released this frame.
    126.         /// </summary>
    127.         /// <param name="rAction">Action to test for</param>
    128.         /// <returns>Boolean that determines if the action just took place</returns>
    129.         public override bool IsJustReleased(string rAction)
    130.         {
    131.             if (!_IsEnabled) { return false; }
    132.  
    133.             // TODO: Code for the button here. I don't own ET5, but it might looks something like this
    134.             //return ETCInput.GetButtonUp(rAction);
    135.             return false;
    136.         }
    137.  
    138.         /// <summary>
    139.         /// Test if a specific action is not pressed. This is used for continuous checking.
    140.         /// </summary>
    141.         /// <param name="rAction">Action to test for</param>
    142.         /// <returns>Boolean that determines if the action is taking place</returns>
    143.         public override bool IsReleased(string rAction)
    144.         {
    145.             if (!_IsEnabled) { return false; }
    146.  
    147.             // TODO: Code for the button here. I don't own ET5, but it might looks something like this
    148.             //return !ETCInput.GetButton(rAction);
    149.             return false;
    150.         }
    151.  
    152.         /// <summary>
    153.         /// Test if a specific action is not pressed. This is used for continuous checking.
    154.         /// </summary>
    155.         /// <param name="rAction">Action to test for</param>
    156.         /// <returns>Boolean that determines if the action is taking place</returns>
    157.         public override float GetValue(string rAction)
    158.         {
    159.             if (!_IsEnabled) { return 0f; }
    160.  
    161.             // TODO: Code for the button here. I don't own ET5, but it might looks something like this
    162.             //return ETCInput.GetButtonValue(rAction);
    163.             return 0;
    164.         }
    165.     }
    166. }
    167.  
    168.  
     
  48. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Ah, I think I understand now.

    The Camera Controller will just do what it's told. The orbiting we see in both videos is based on the input solution.

    In Unity's input solution, the mouse is frame-rate independent. So, that means the Camera Controller is too; it will be consistent at different frame rates. This is true for the XBox controller through Unity's input solution too:


    (The first half is me using a mouse and the second half is me using an Xbox controller)


    Your input solution may not be frame-rate independent. With the code you listed, the Camera Controller would be orbiting using line 65. The Camera Controller will just do what it's told. If the input isn't frame-rate independent, the camera orbiting won't be either.

    I don't think this is something for me to "fix" in the camera solution. It seems you're having a global "input" issue. It's something the input solution should resolve or if you had to, in your input source.

    [EDIT]
    Unfortunately, I don't own In Control (which I think is your input solution). So, I can't test that.
     
    Last edited: Nov 30, 2017
  49. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    Thanks I'll look into that in incontrol then.
     
    Tryz likes this.
  50. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    I got it working by adding a delta time multiplier. I have an additional issue however. How would I make it so the camera follow rotation is disabled when you are moving the camera manually with the right stick in my case. So currently the right stick will move at the speed i want it to based on the speed I set on each camera while the player is stationary but if I'm moving the character and the camera is desiring to rotate but i'm holding the stick to the right to look to my side I hit a point where the auto rotation is much stronger than the look and it's undesirable. I would like to make it so if you move the right stick the auto rotation is temporarily disabled until you release the look on the right stick. This is for the 3rd person follow cameras.