Search Unity

Camera Controller Release

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

  1. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Thank you! Camera Controller saves the day again :)
     
    Tryz and hopeful like this.
  2. Sarun_Ratta

    Sarun_Ratta

    Joined:
    Mar 26, 2015
    Posts:
    8
    Hi, I just bought Camera Controller and MotionController. I try to make a top down controller like a game call Transistor but I still can't get the result that I want, so I would like to get some idea about how to setting up Camera Controller and Motion Controller to archive result like this game.

    (
    )
     
  3. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hi, I watched some of the video and it looks like the camera has a fixed orientation and forward direction. Then, the character moves in the area and the camera follows as long as she's within some bounds.

    The way I'd do it is NOT use the character as the anchor. Instead, create a new GameObject (lets call it "Camera Focus") and add a small component that moves the Camera Focus GameObject to the character when she's a certain distance away. So, everything the camera does would be based on the Camera Focus. In the small component you create, you would then control when and how the Camera Focus moves... which causes the camera to move.

    For the camera setup, I'd use a Look At Motor since your camera doesn't need to orbit. Here's the setup that I did.



    Notice the "Anchor Offset". This is how you get the camera to the position you want relative to your Camera Focus. Make sure you uncheck "Rotate Anchor Offset". This way, the camera doesn't try to rotate with the character.

    Then, set your Camera Focus as the Target in the motor.

    I haven't built a whole game this way, but I know others are doing something similar. You'll then have to play with how you want to move (keyboard, point and click, etc.)
     
  4. Sarun_Ratta

    Sarun_Ratta

    Joined:
    Mar 26, 2015
    Posts:
    8
    Hi, thank you for your idea, now I think everything work perfectly like what I want.:)
     
    Tryz likes this.
  5. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
  6. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey Tom,

    It does. I use different "motors" that you can transition in and out of. So, you could use the Look At Motor or Spline Motor for that.

    The first web demo is an example of the spline motor moving the camera while you look at a target. Then, the transition activates the 3rd person motor. http://www.ootii.com/Unity/CameraController/Demo/index.html
     
  7. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Hi,

    I've purchased the package and am trying it out. I've used Look At Motor with disabling the Static Position and that seems to give me the closest effect to what I described above, but the player is behind the camera and I can't see him. What I'm trying to achieve is something that's seen in Zelda when player locks onto a target and is engaged with that target. Like in this video at around timestamp 7:40, you'll see Link locking on and fighting several enemies.



    I think I need to use Look At Motor with Use Static Position disabled and target being the enemy. But when I try that in my play scene I don't see the player at all. My goal is to get the effect in this video (Gauntlet dragon boss fight), see how the camera is following the player with one central object being the dragon (about 20s in).



    Any help/direction you can provide is appreciated.

    Thank You.
    Regards,
    Tom
     
  8. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    One of the things you can do with the Look At motor is set the offsets. These offsets are relative to the character's forward direction. In the image below, the camera will be behind and above the character.

    As you rotate the character, the position of the camera changes... while still looking at the target.



    This approach feels a bit disorienting to me as you're rotating with the player, but the view is focused else where.

    One of the things you can do is create a "Character Follower" GameObject and use that as the CC's anchor instead of the character itself. This approach gives you a lot of control as the camera will move with the "Character Follower", but still use the motors (like the Look At).

    I noticed in both videos, the character can be to the left or right of the camera. Using the "Character Follower" lets you do this as the camera isn't tied so tightly to the character.

    I've had a couple of requests for this approach recently. So, I plan on creating an example "Character Follower" component. But, it really is just a matter of having the new GameObject follow your character within some limits and smoothing. Then, set this as the "Anchor" instead of the character.

    I hope that makes sense.
     
    pesaru and TeagansDad like this.
  9. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Hello,

    I think I understand. The "Character Follower" object I just created an empty and added it to the player but that didn't help, and thinking about it I don't see a reason why it would since it turns with the player just like the player itself. So that would mean I would have to code up this Character Follower to be in correct position with respect to the object I'm looking at is that right? I just want to make sure I'm getting your point. So I would orbit the Character Follower object around the player as the player turns, making sure a vector/direction from Character Follower goes through the player to the object I'm looking at. Then using Character Follower as an anchor for the camera will cause the camera to display the player and the object I'm looking at. Is that the idea?

    Thank You for the help.
    Regards,
    Tom
     
  10. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Just wanted to let you know that this method works fine. I've added an empty object (Anchor Pivot) to the Player, then added a Anchor Point to the Anchor Pivot. The CC is anchored to Anchor Point. On the Anchor Pivot I simply set the rotation to direction looking towards the Look At object. That keeps the Anchor Point always in the right position and thus the CC pointing at the Look At object while player staying in the view.

    Thank You very much for the help.

    Regards,
    Tom
     
    hopeful likes this.
  11. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Cool. I'm glad that works.

    I was actually thinking that the "Anchor Pivot" or "Character Follower" would be a separate GameObject, but if that approach works for you, that's totally fine.

    With the GameObject approach, the "Character Follower" component on the new GameObject would have the logic to follow the Player GameObject. Then, you would add logic to determine how it follows.

    But, your approach is smart too. :)
     
    pesaru likes this.
  12. cmarfil

    cmarfil

    Joined:
    Dec 27, 2016
    Posts:
    6
  13. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'd use the 1st Person Motor and then set the offsets for how you want the camera. Your model will have to support 'no head', but you should be able to get the camera how you want it.

    The rotation options should allow you to disable the camera rotation and rotate with your character or force character rotation with the camera.
     
    pesaru likes this.
  14. pesaru

    pesaru

    Joined:
    Jun 24, 2016
    Posts:
    8
    When I watched the camera controller videos, it described the camera as being tied to the player by a rope. However, whenever I run towards the camera, I push it away while the camera continues to focus on the front of my character, leaving me blind to whatever I'm running towards. Is there a way to have it truly behave as if it were rope and not transform into a stick while I run towards it?
     
  15. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I do my best to describe the assets. As always, the analogies may not be 100%. What I mean is that as you run in circles around the camera it doesn't follow you or get pulled by you until you pull away from it.

    You can see that in action the web demos I provide.

    With the existing camera motors, you can't just run up to the camera. Otherwise, your body could cover the whole view. However, you could create a custom motor to do that if you want.
     
    Last edited: Jun 30, 2017
    pesaru likes this.
  16. pesaru

    pesaru

    Joined:
    Jun 24, 2016
    Posts:
    8
    Because the rope mechanic in these types of cameras tends to behave a certain way in games, it ties a certain expectation to the way the camera will behave.

    Unfortunately, any actual movement in the videos is extremely limited and most time is spent exploring certain options and effects and rotating the camera while standing still. Even the asset's GUI reiterates the rope metaphor. This is more of a stick with a rock at the end. I am frustrated I spent so much time reading the manual, rewatching the videos, trying to figure out how to make it behave like a true rope mechanism, thinking that I just hadn't explored the options quite enough.

    Is there a way to adjust the camera to follow the player more aggressively? In Tomb Raider, which seems to resemble this camera the most (and is also one of the games you compare the camera to), even a maximum change in rotation of the player is met with a quick swivel of the camera that is completed within a few hundred milliseconds. I'm having to walk in the same direction for 20 seconds before this camera matches the rotation of my character.
     
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Since there's no standard "camera based rope mechanic", it's just an analogy that helps describe the effect. Sorry it didn't work for you.

    The 3rd Person Fixed motor would be what you describe, not the 3rd Person Follow motor.

    I'm not sure what you mean.

    If you want the camera to always be behind the character (even as they pivot), use the "Fixed Motor". It's like locking the camera in place.

    If you want the camera to stay behind the player, but allow the character to still pivot towards the camera (like older adventure games do) you could use the 3rd person Fixed motor. If you want the camera to rotate with the character, check the "Rotate with Anchor" option.

    The 3rd Person Follow camera will only go behind the character after you "pull" the character away (hence the rope analogy). It's closer to modern 3rd person games.

    If you still don't like any of those, you can tie the camera to an object besides the character. This new GameObject would be the anchor and you can control its movement anyway you want. The camera would then follow the new GameObject as you move it.
     
    pesaru likes this.
  18. pesaru

    pesaru

    Joined:
    Jun 24, 2016
    Posts:
    8
    Even though this wasn't what I was looking for, I appreciate your responsiveness and I'll experiment with your suggestions over the weekend, thanks.
     
    Tryz likes this.
  19. pesaru

    pesaru

    Joined:
    Jun 24, 2016
    Posts:
    8
    After familiarizing myself with the controller, I think I'll be able to do everything I want to do, so thanks again. However, I have one last question. If I select "Fixed Motor," uncheck "Use Rig Anchor," and set the same anchor transform that the rig is using, it warps the camera to the center (0,0,0) of the map and it won't do anything. There are certain game objects that can be set to get the Fixed Motor to work, but the bulk of my game objects send it to 0,0,0. Like, maybe 2% of my game objects work as an anchor (but only when set through this secondary anchor option, they all work when set as the rig anchor). I'm confused.
     
    Tryz likes this.
  20. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    That's a bug.

    The FixedMotor.cs is pretty simple. In the RigLateUpdate() function, it should look like this:
    Code (CSharp):
    1.             if (RigController == null) { return mRigTransform; }
    2.  
    3.             if (Anchor != null)
    4.             {
    5.                 mRigTransform.Position = AnchorPosition + (Anchor.rotation * _Offset);
    6.             }
    7.             else
    8.             {
    9.                 mRigTransform.Position = AnchorOffset + _Offset;
    10.             }
    11.  
    12.             if (Anchor != null)
    13.             {
    14.                 mRigTransform.Rotation = Anchor.rotation * _RotationOffset;
    15.             }
    16.             else
    17.             {
    18.                 mRigTransform.Rotation = RigController._Transform.rotation * _RotationOffset;
    19.             }
    20.  
    21.             return mRigTransform;
    Replace the contents with the code above and you should be fine.

    The rotation for the Fixed Motor is either set to the rotation of the anchor (if there is one) or the rotation of the Camera Controller transform if there isn't one. I'm not sure that's the best approach, but as you can see... it's easy enough to change.
     
    pesaru and hopeful like this.
  21. pesaru

    pesaru

    Joined:
    Jun 24, 2016
    Posts:
    8
    Thanks for taking time out of your holiday weekend to fix it. It's working amazingly well now. I'm in love with it after just a tiny bit of custom code.
     
    hopeful, TeagansDad and Tryz like this.
  22. AppHappy

    AppHappy

    Joined:
    Aug 9, 2016
    Posts:
    3

    I am having the same issue when I'm trying to rotate with the first person camera it jumps back to the previous position. Are you able to help me modify the input source to work with mobile touches? I haven't been able to figure it out.

    Thanks
     
  23. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    What mobile input solution are you using?

    When it comes to orbiting, the camera motors are looking at ViewY and ViewX properties of the Input Source you create. The last property would be ViewActivated that determines if it is time to pay attention to the view.
     
  24. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    Is there any native integration with "Third Person Motion Controller"? Or any other way to toggle between 1st and 3rd Person using "ooti Third Person Motion Controller"?
     
  25. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    It integrates with the MC seamlessly... I created both assets to work together.

    To toggle between 1st and 3rd with the MC, there is two things to do. First, you would just enable the WalkRunStrafe motion and second activate the right CC Transition Motor. This will glide the camera to 1st person and end in the right motor. You could do this in your core game logic as needed.

    If you just want to do it while holding a key down...say for aiming like Tomb Raider, no need to add extra game logic. You can use the WalkRunStrafes Action Alias property to set which input entry that will activate the strafe when held. That same entry would be used by the CC's Transition Motor.

    You will want to add the CC Transition Motors and end motors that give you the feel you are looking for.
     
    pcg likes this.
  26. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    That's good. My game will have alternating cameras as it happens (eg in Skyrim, Miscreated, ARK and others). I need to have both cameras working well together. And a good move for the character. I believe these two Assets will meet my needs. Perfect thank you.:D

    It would be cool if you had something simple to integrate these two, as it would draw more attention from buyers ;)
     
    Last edited: Jul 11, 2017
    Tryz likes this.
  27. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    They integrate automatically. Nothing extra needed at all. Maybe I could market it better. :)
     
    RobsonFMaciel likes this.
  28. AppHappy

    AppHappy

    Joined:
    Aug 9, 2016
    Posts:
    3

    I'm trying to have the camera scripts work the exact same way as they do in game preview mode on the computer for the mobile devices. The issue I notice is when I create the build for mobile and when I try swiping on the iPad. The camera moves to the correct rotation when swiping but once I remove my finger and then try to reswipe, the camera resets to original rotation and then rotates .

    What I need is to have the script not reset the camera rotation each time the player touches the screen and to allow the camera rotation to continue where is was left off. I'm not sure what I would need to change to update the input source to the mobile ones as I'm relatively still new to Unity. I basically want the x and y rotation of the camera to be able to get adjusted and not reset for each new touch. Could you please help me with creating the input source needed to work with mobile.

    Thank you
     
  29. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm happy to help provide some direction. Unfortunately, I don't own all the Unity input solutions that exist... that would be a lot of money. :)

    I had asked earlier, "What mobile input solution are you using?"
    Easy Touch 5, Input.Touches, Touch Input Layout, Control Freak 2, UNInput, Simple Touch Control, etc...

    For example, there is already an Input Source created for Easy Touch 5:
    http://www.ootii.com/UnityMotionVault.cshtml (scroll down to "Shared Input Sources")

    This video walks you through it step-by-step too:


    Again, I'm happy to help (if I can). I just need to know what input solution you're using to get the swipe, button presses, etc.

    Unfortunately, there's nothing in the CC that automatically resets the camera to the original rotation. So, there must be something specific to your project that is doing that. Are you calling SetYawPitchTarget() or controlling the camera position in another way?
     
  30. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Here's Camera Controller hooked up to a server authoritative player controller with first person, third person, and fixed third person modes for anyone who wants to see what this asset can do.
     
    TeagansDad, Tryz and hopeful like this.
  31. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Very cool! Clean and smooth. :)
     
  32. the_genius

    the_genius

    Joined:
    Mar 24, 2014
    Posts:
    7
    Hello,

    I'm really liking the Camera Controller so far. Especially how easy it is to use different motors and transition between them.

    I have a question. Is it possible to have different Zoom properties for different motors?

    I read this in the guide so I guess it might have to be done through code:
    Core functionality such as collision detection and field-of-view zooming are done in the Camera Controller and not in the motors.

    In which case, how can i set the zoom via code and is there some callback for when the active motor changes?
     
  33. Tryz

    Tryz

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

    Not yet. That's something on my to-do list, but I'm a ways away from it.

    The CameraController has a couple of callbacks: MotorActivated, MotorUpdate, and MotorDeactivated. These will report to you the motor that is relevant.

    mCameraController.MotorActivated = OnMyMotorActivated;

    Using those, you could disable and enable the zoom. You can also force the zoom using TargetFOV. For example:

    mCameraController.IsZoomEnabled = false;
    mCameraController.TargetFOV = 30f;

    I hope that helps,
    Tim
     
  34. the_genius

    the_genius

    Joined:
    Mar 24, 2014
    Posts:
    7
    Thank you, i've got it working now.

    I have one more question. It looks like the 3rd person follow motor always keeps the camera at the same distance from the player (unless there are walls it hits). Is it possible to set a max speed that the camera can move at?
    In my game it is possible for the player to sprint and i would like the effect of the camera getting left behind until the player stops sprinting and the camera catches up.

    Thank you!
     
  35. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Unfortunately, no. The camera will "hard follow" the anchor.

    That said, you could make the anchor a separate GameObject that is coded to follow your character however you want. Then, set this "follower" as the anchor the camera uses. This would allow you to control the lag however you want, but still use the camera features.

    If you do this, just remember to check the "Force Update" on the CC's inspector.
     
    hopeful likes this.
  36. the_genius

    the_genius

    Joined:
    Mar 24, 2014
    Posts:
    7
    Thank you. I'll try to explain what i did in case anyone is interested.

    This is exactly what i did in the end. I used the SmoothFollow.cs script out of the Standard Assets (Utility). I edited it a bit removing the rotation damping and adding damping in the x and z directions. I made this follow the player and used it as the anchor on the Camera Controller.

    When the player got close to the camera, as the camera wasn't directly following the player it showed up a lot of the jumpy behaviour of the animations and the third person controller I am using (Invector's). I managed to get rid of them but it probably wasn't the best way; I created another GameObject which smoothly followed the player with less damping (so it was much closer). Then in each frame I took the vector difference between the closer object and player and added it onto the further away object which the camera is following. This meant the following object moved with the same little jumps as the player so everything looked super smooth again from the camera.

    I kept the different zooms for different motors setup i had, but I decided to change the zoom to modify the distance to the player instead of depth of field. I read the warning in the documentation about the object clipping problems while zooming using this method, but in my game I think it looks better using distance. I had to edit the camera source code a lot because I had a few problems when changing motors and making smooth transitions between them.

    Now I have a very smooth and good looking camera system which suits my game perfectly. Thank you very much for this amazing asset! I would definitely recommend it. It might not have had exactly what I needed out of the box, but it didn't matter as the source code is very well written and easy to navigate.
     
    hopeful and Tryz like this.
  37. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Great write up!
     
  38. StudioTerra

    StudioTerra

    Joined:
    Oct 1, 2013
    Posts:
    7
    @Tryz Hi! Question here about 3rd Person Follow zooming; I’d like the camrea to zoom in not by using Field of View but distance instead (or faking that, but having perspective change accordingly). Ideally setting a default distance from the character, a minimum zoom distance and maximum distance (I actually want to zoom more out than in). Is there any way to add this to the Zoom Properties box?
     
  39. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    The zoom properties box is in the CameraControllerEditor.cs. You would have to modify my file in order to add those properties and feature.

    Another option would be to create a custom motor and have the motor control the "position zoom". Your motor would then show the properties and activate/deactivate as you create it. Those zoom properties would then live on your custom motor.

    Just make sure you research "position zoom" first. It has its own drawbacks. :)
     
  40. burrito_bill

    burrito_bill

    Joined:
    Apr 16, 2014
    Posts:
    1
    Hi Tim,

    I bought the Camera Controller the other day and it is fantastic! So thanks for all your hard work.
    I am using the 3rd Person Fixed camera and allowing for the player to yaw and pitch freely.
    However for some reason the pitch range parameters are not working and when changing the pitch you can move the camera all the way above the player until it starts to glitch when the camera is looking directly down at the player.
    I have tried changing the range parameters for the yaw and this works as expected.
    Can you see any reason why the pitch range wouldn't be working?

    I have attached my settings below.



    Cheers
    Will
     
  41. Tryz

    Tryz

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

    It has to do with the "Rotate Anchor Offset" being unchecked.

    Normally (when checked), "Rotate Anchor Offset" ensures that the camera tilts as the character/anchor tilts. This is important because the local position, yaw, and pitch of the camera are relative to the anchor. So a pitch limit of 30 means the camera won't pitch beyond 30 degrees of the anchor. When the camera and anchor are in sync, this makes sense.

    When "Rotate Anchor Offset" isn't checked, you may tilt the anchor and the camera won't follow. The two can become very disconnected and the pitch limits can cause the camera to stop rotating when you may think it shouldn't.

    So, I disabled them.

    That said, I may be too draconian about this. So, I just pushed up an update that no longer does this automatically. The issue is still there, but you can disable the pitch limits as needed.

    Unfortunately, this is the issue without pitch limits. At the north and south pole of the orbit sphere 3rd person cameras use, the rotation becomes awkward. That's due to the fact that we try to keep the camera from going upside down as it orbits up the back of the character, over the top, and down the front.

    Limits keep that sane. :)


    Grab the latest updated and I won't disable the pitch limits automatically. Just be aware of the disconnect that I mentioned.
     
  42. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    How would you go about having a rotation offset for a third person camera? The only settings I'm seeing are position offsets. I'm trying to do a traditional over the shoulder camera where the camera is slightly rotated to the character.
     
  43. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm not exactly sure what you mean.

    The offsets control the anchor and focus point of the camera resulting in rotation changes. I talk about this in the User's Guide (page 17):


    To get the over-the-shoulder view above, I'd do the following:
    1. Use the 3rd Person Fixed motor
    2. Change the Anchor Offset to be (0, 2, 0)
    3. Change the X-Axis Offset to be 0.5 (or something)
    4. Change the Distance to be 3 (or your liking)

    If you want the camera to stay with the character when the character rotates, check the "Rotate With Anchor" checkbox.

    Is that what you mean?
     
  44. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    No, I already saw that. What I'm saying is having some rotation on it as well, like 15 degrees on the yaw.


    Just a random picture I found online, but see how the camera appears to be slightly rotated in the direction of the character?
     
  45. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I see. This is more for targeting.

    The 3rd Person motors are always going to want to look at the Anchor Offset + X-Axis Offset. So, adjusting the X-Axis Offset will help.

    However, I think you really want to use the Fixed Motor. You can set the Rotation Offset (see below).

    In this case, I fixed the position of the camera (relative to the anchor) and add the Rotation Offset. The transitions will have it go in and out smoothly.



    However... it turns out that I never exposed the Rotation Offset. You can set it in code or add this bit of code to the FixedMotor.cs at line 76:

    Code (CSharp):
    1.             if (EditorHelper.QuaternionField("Rotation Offset", "Offset to add to the anchor's rotation to use.", RotationOffset, RigController))
    2.             {
    3.                 lIsDirty = true;
    4.                 RotationOffset = EditorHelper.FieldQuaternionValue;
    5.             }
    I'll add this for the next update.
     
    TeagansDad likes this.
  46. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Okay thanks, I'll give it a shot with switching to that instead. As to transitions, that reminds me. Have you ever considered having transitions be more code based instead of defined in the editor?
     
  47. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Does the FixedMotor not support distance from the anchor? I still need to have pitch rotation in for looking up/down, with collision support to move the camera closer.

    EDIT:
    Nevermind. I just decided to set the yaw rotation on the third person fixed motor as a way to control it. I don't currently do yaw rotation in game for players, so that does work as an offset for my needs. If I ever do need to support yaw rotation then I can just add the offset to their base value, and work from that.
     
    Last edited: Aug 27, 2017
    Tryz likes this.
  48. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Distance would really be done with the "Anchor Offset". With the Fixed Motor, the Anchor Offset represents the actual position of the camera (relative to the anchor).

    With the 3rd Person Motor the Anchor Offset represents the focus point the camera is looking at... so the Distance is the orbit distance (radius) around that focus point.

    That works.

    The transitions are really just a matter of running two motors and then blending the results over time. So, something needs to be able turn run "over time". Having the transition be a motor allows it to do that.

    I suppose a Coroutine could do the same thing. The code would really be similar to what I have in the transition motor.
     
  49. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    @Tryz Is it possible to use the asset with Rewired Input Manager instead? If yes, then how? Thanks.
     
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Definitely. All my assets use a wrapper called an "Input Source". It allows my assets to work with any input solution.

    I describe more about Input Sources here:
    https://ootiigames.com/?page_id=600

    Fortunately, cygnusprojects created the Rewired wrapper for us. You can view the documentation and download it from here:
    http://www.ootii.com/UnityMotionVault.cshtml#Rewired


    Note: I haven't used Rewired myself, but I know other people use this input source. So, you'll be fine.
     
    imDanOush likes this.