Search Unity

New Standard Assets - a.k.a. Sample Assets, Beta Release

Discussion in 'Assets and Asset Store' started by duck, Jan 17, 2014.

  1. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Hey Foj, so i just rolled back my local repo to the last released version and used you setting in the input manager. Everything worked just fine for me. If you try reducing the dead zone it might help you to see that both axes are in fact working at the same time. The only other thing that I can suggest is to try tweaking the sensitivity on each axes separately.
     
  2. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Hey Neatgadgets,

    There is nothing built in that will do that for you but you can simply code something in to the ThirdPersonUserControl to disable the input polling in fixedupdate or the call to the ThirdPersonCharacter.move function.
     
  3. Foj

    Foj

    Joined:
    Apr 11, 2013
    Posts:
    17
    Cheers tnetennba (again),

    I have the joystick working more like the mouse now - moved Dead to 0.05. So I am not a coder (probably totally obvious) can I just ask you two questions,

    1) the joy-stick still definitely moves between one-of left-or-right-or-up-or-down (but far more fluidly now). Re-checking the mouse, it's hard to tell, but it seems to be doing the same (extremely fluidly to look like the 'blend' I wanted). Have I read this visually right: that the 'simpleMouseRotator' script only does one axis at time - quickly jumping between them - and does not truly 'blend' the axis as I thought?

    2) I now have the Input Manager with the two slots I posted the image of using the Name 'Mouse X' and 'Mouse Y' and two slots higher up that use the same Name for the Mouse Movement (Name = Mouse X/Y, Type = Mouse Movement, Axis = X/Y axis), is this bad practice? I've tried using both the mouse and right joystick together and nothing explodes...

    Many thanks in advance.
     
  4. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176

    1) I think what you are seeing is to do with the way that the joystick works. If you are fully over to the right then you cant have any up or down. Once you go to about say 1:30 ( if you imagine the joystick as a clock face ) then you are only really getting about 50% of each. At least that was what I seemed to be seeing when I output the values from the axis.

    2) It shouldn't cause any problems. Ideally however you would want to set something up so that the user can choose between controller or mouse and then have two paths in the code. That way you could have different calls for the the axis. So for mouse you would be doing

    Input.GetAxis("Mouse X");

    and for controller you would have the axis setup

    Input.GetAxis("Controller X");

    or something to that effect.
     
  5. Foj

    Foj

    Joined:
    Apr 11, 2013
    Posts:
    17
    Thanks, all makes sense. ...just one thing: 'seeing the output values', is there someplace that explains how to do this (what everything means and so-on), an idiots-video-guide is what I an looking for. Thank you.
     
  6. deltamish

    deltamish

    Joined:
    Nov 1, 2012
    Posts:
    58
    Thanks tnettennba I really appreciate the help thank you
     
  7. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    There are loads of tutorials on our site here http://unity3d.com/learn

    What you need though are calls to Debug.Log http://docs.unity3d.com/ScriptReference/Debug.Log.html

    That way you can output into the console window the axis values which would be something like

    Debug.Log(Input.GetAxis("Mouse X") + " " + Input.GetAxis("Mouse Y"));
     
  8. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    Can we expect any more updates to this package (last one was Feb 13th) or is the current version "final" until whatever is released with 5.0?
     
  9. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    We will be doing one for 4.6 when it is released that will use the new gui system. I will also try and back port as much of what has went into the 5.0 version as makes sense ( car for example wouldnt as it is based on the newer version of physx ).
     
  10. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    In a previous post, you mentioned that FPS crouching will probably be worked on, but not prone.

    Can you share any progress on the crouching?

    On another note;
    I'm trying to implement the NavMesh Agent in order to replace our current collider-based solution. I've been having a lot of trouble with our previous CharacterControler implementation, as it creates a lot of conflicts when trying to enable the agent/disable the agent on non-NavMesh areas.

    As such, do you suggest we use a RigidBody instead? Do you have any advises on how to properly implement a NavMesh agent into the FPS sample?

    Thank you.
     
  11. Mons1999

    Mons1999

    Joined:
    Sep 24, 2012
    Posts:
    33
    I have another question about the car. Actually this time it's about the AI Car in the Sample Assets package.
    It works really fine in the example scene because there's no obstacle. But when I put it in my scene (which is a city), it went in the walls and the other dynamic agents.
    My city is already baked for Unity Navigation, but when I tried to add a NavMesh component to the car, and it didn't work anymore.
    Do you know if it's possible to combine a NavMesh agent and your AI Car script ?
    Or is there another way to have a realistic behavior of the car while using unity Navigation
     
  12. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    The car AI is not designed to work with the navmesh at this current time. It may be something that I will look at in the future.
     
  13. jannis99

    jannis99

    Joined:
    Jan 27, 2014
    Posts:
    3
    It would be very cool if you could include strafing for the 3rd Person Controller.
     
  14. AxisRob

    AxisRob

    Joined:
    Aug 6, 2013
    Posts:
    33
    This is a follow-up to the conversation here:
    http://forum.unity3d.com/threads/ap...works-in-the-beta-assets.246355/#post-1722010


    This first video is a video of the scene view while the fireworks system particles are being simulated. Everything works fine, no issues. If I click on the game view while this simulation is running, the fireworks show up perfectly there as well.


    The second video is that exact same view while the game is running. Note that aside from one firework at the end, they launch into the air and then disappear in a puff of smoke.

    Is this something I might be doing wrong? I have only a single, unmodified firework prefab in my scene view, along with the default camera angled to watch it explode.
     
  15. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    That is strange. I am looking into this and I will get back to you when I have more information.
     
  16. AxisRob

    AxisRob

    Joined:
    Aug 6, 2013
    Posts:
    33
    Thank you!
     
  17. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    This seems like it is a bug with shuriken not triggering the on death event which causes the next sub emitter to be born. If you could file a bug on this then send me the bug number that would be great.

    You can submit bugs by going to the help -> report a bug menu in the editor.
     
  18. AxisRob

    AxisRob

    Joined:
    Aug 6, 2013
    Posts:
    33
    Case 624325
    Is there anything else I can do? :)
     
  19. KuGrou

    KuGrou

    Joined:
    Sep 18, 2013
    Posts:
    2
    I was having a similar issue with "duds" in the fireworks, but I think I found a workaround until the bug is fixed.
    Since it didn't look like it was necessary for the explosion to be chained off the smoke I set both the explosion and smoke to be death sub emitters of the base fireworks, and removed the sub emitters on the smoke.
     
    AxisRob likes this.
  20. AxisRob

    AxisRob

    Joined:
    Aug 6, 2013
    Posts:
    33
    I will try this! Thank you!

    Edit: Worked like a charm, you are my hero
     
    Last edited: Aug 6, 2014
  21. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Nothing else you need to do . I can get the bug pushed through as fast as possible.In the meantime however it looks like KuGrou's workaound is pretty solid.
     
  22. Xander93

    Xander93

    Joined:
    Feb 22, 2013
    Posts:
    14
  23. Natasha_Ivanava

    Natasha_Ivanava

    Joined:
    Aug 7, 2014
    Posts:
    1
    I just upgraded to Unity 4.52f1, downloaded beta sample and got the following errors:
    Assets/Sample Assets/Cross Platform Input/Scripts/Editor/CrossPlatformInputInitialize.cs(81,34): warning CS0618: `UnityEditor.BuildTargetGroup.BB10' is obsolete: `Use BlackBerry instead',
    Assets/Sample Assets/Cross Platform Input/Scripts/Editor/CrossPlatformInputInitialize.cs(89,34): warning CS0618: `UnityEditor.BuildTargetGroup.BB10' is obsolete: `Use BlackBerry instead',
    Assets/Sample Assets/Cross Platform Input/Scripts/Editor/CrossPlatformInputInitialize.cs(34,42): warning CS0618: `UnityEditor.BuildTarget.BB10' is obsolete: `Use BlackBerry instead',
    Assets/Sample Assets/Cross Platform Input/Scripts/Editor/CrossPlatformInputInitialize.cs(60,34): warning CS0618: `UnityEditor.BuildTarget.BB10' is obsolete: `Use BlackBerry instead'
    MuscleClip 'Run Turn' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm,
    MuscleClip 'Walk Turn' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm,
    MuscleClip 'Run' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm,
    MuscleClip 'Stand Turn' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm,
    MuscleClip 'Walk' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm,
    MuscleClip 'Walk Turn Sharp' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm,
    MuscleClip 'Idle'conversion warning: 'Reference/Pivot/Root/Hips' has translation animation. It is not supported.
    MuscleClip 'Idle' conversion warning: 'Reference/Pivot/Root/Hips' is between humanoid transforms and has rotation animation. This might lower retargeting quality,
    MuscleClip 'Run Turn Sharp' conversion warning: Bone position is different in avatar and animation
    'LeftLeg' : position error = 7.696519 mm
    'LeftFoot' : position error = 15.233784 mm
     
  24. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176

    They are not errors they are warnings. We are waiting for 4.6 to be released before we do another release as the assets as just sitting waiting to go using the new gui system.
     
  25. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Hi Xander, we felt that it was not necessary for the simple examples to add target matching. However, we do have something else in the pipeline that will be great for demonstrating target matching. There is no ETA on that yet though.
     
  26. marval

    marval

    Joined:
    Jul 10, 2013
    Posts:
    46
    hi,
    @Unity Technologies
    i really need an " mecanim aiming poses" example
    demonstrating how to aim forward,aim up and aim down with "aiminig poses" ( NOT with ik )
    there is no example or tutorial anywhere demonstrating this and I'm starting to get frustrated
    and that is what is missing to be able to make a Third Person "Shooter" iOS game with Unity
    could you please include aiming poses in the New Third Person Character and turn this example into a Third Preson Shooter?
     
  27. PaulOrac

    PaulOrac

    Joined:
    May 24, 2013
    Posts:
    3
    Hey Just downloaded this new assets and LOVE them. I've been using Unity for a year now, I'm new to the Game Dev World... I've done quite a few things you added here by myself while learning but looking at this scripts made me re think the whole way I do things. Thankyou for this!! Now... I've been trying to add my own modifications to achieve different purpouses and the only thing that's got me stuck at the moment is the ThirdPersonCamera, I Added a script to change Cam.transform.Z position at runtime, but it won't let me... I can only change pivot.z but that's not really what I want... Where should I add the ScrollWheel input to change my cam.z? Thanks :D
     
  28. PaulOrac

    PaulOrac

    Joined:
    May 24, 2013
    Posts:
    3
    OK... you know what they say, when you go to the doctor you'll probably feel better already... and that's what it is. I managed to do it, it was the ProtectCameraFromWallClip.cs overriding the position. I added a few lines to the script to make it so you can zoom with the MouseScrollWheel I found that with a MoveSpeed of 20 in the FreeLookCam script it works preety nice. Now It zooms while protecting the cam. I'll Leave the Code here, if anybody feels like improving it would be cool :D. I hope this helps someone, Cheers!!

    ///Create a C# script with the Name ZoomNdontClip.cs and add the following code to it, then replace the ProcectCameraFromWallClip.cs with this new one in the FreeLookCamRig GameObject.


    Code (CSharp):
    1. using System;
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class ZoomNdontClip : MonoBehaviour
    6. {
    7.    
    8.     public float clipMoveTime = 0.05f;                     // time taken to move when avoiding cliping (low value = fast, which it should be)
    9.     public float returnTime = 0.4f;                     // time taken to move back towards desired position, when not clipping (typically should be a higher value than clipMoveTime)
    10.     public float sphereCastRadius = 0.1f;               // the radius of the sphere used to test for object between camera and target
    11.     public bool visualiseInEditor;                      // toggle for visualising the algorithm through lines for the raycast in the editor
    12.     public float closestDistance = 0.5f;                // the closest distance the camera can be from the target
    13.     public bool protecting { get; private set; }        // used for determining if there is an object between the target and the camera
    14.     public string dontClipTag = "Player";                // don't clip against objects with this tag (useful for not clipping against the targeted object)
    15.    
    16.     private Transform cam;                              // the transform of the camera
    17.     private Transform pivot;                            // the point at which the camera pivots around
    18.     private float originalDist;                         // the original distance to the camera before any modification are made
    19.     private float moveVelocity;                         // the velocity at which the camera moved
    20.     private float currentDist;                          // the current distance from the camera to the target
    21.     private Ray ray;                                    // the ray used in the lateupdate for casting between the camera and the target
    22.     private RaycastHit[] hits;                          // the hits between the camera and the target
    23.     private RayHitComparer rayHitComparer;              // variable to compare raycast hit distances
    24.    
    25.    
    26.     /// <summary>
    27.     /// Zoom Vars
    28.     /// </summary>
    29.     float z;
    30.     public float zoomMultiplier = 5;                    //Adjust this value to make zooming faster or slower
    31.     public float zoomMin = 0;                            //Adjust this value to the minimum wanted zoom
    32.     public float zoomMax = 10;                            //Adjust this value to the maximum wanted zoom
    33.    
    34.    
    35.     void Start() {
    36.        
    37.         // find the camera in the object hierarchy
    38.         cam = GetComponentInChildren<Camera>().transform;
    39.         pivot = cam.parent;
    40.         originalDist = cam.localPosition.magnitude;
    41.         currentDist = originalDist;
    42.        
    43.         // create a new RayHitComparer
    44.         rayHitComparer = new RayHitComparer();
    45.     }
    46.    
    47.    
    48.     void LateUpdate() {
    49.        
    50.         //Get the Scroll Input
    51.         z = Input.GetAxis("Mouse ScrollWheel");
    52.        
    53.         //Get the current position of the camera and add the scrollWheel input to the Z axis
    54.         Vector3 camPos = new Vector3(cam.localPosition.x, cam.localPosition.y, cam.localPosition.z + z * zoomMultiplier);
    55.        
    56.        
    57.        
    58.        
    59.         // initially set the target distance
    60.         float targetDist = originalDist;
    61.        
    62.         ray.origin = pivot.position + pivot.forward * sphereCastRadius;
    63.         ray.direction = -pivot.forward;
    64.        
    65.         // initial check to see if start of spherecast intersects anything
    66.         Collider[] cols = Physics.OverlapSphere(ray.origin, sphereCastRadius);
    67.        
    68.         bool initialIntersect = false;
    69.         bool hitSomething = false;
    70.        
    71.         // loop through all the collisions to check if something we care about
    72.         for (int i = 0; i < cols.Length; i++) {
    73.             if ((!cols[i].isTrigger) && !(cols[i].attachedRigidbody != null && cols[i].attachedRigidbody.CompareTag(dontClipTag)))
    74.             {
    75.                 initialIntersect = true;
    76.                 break;
    77.             }
    78.         }
    79.        
    80.         // if there is a collision
    81.         if (initialIntersect) {
    82.             ray.origin += pivot.forward * sphereCastRadius;
    83.            
    84.             // do a raycast and gather all the intersections
    85.             hits = Physics.RaycastAll(ray, originalDist - sphereCastRadius);
    86.         } else {
    87.            
    88.             // if there was no collision do a sphere cast to see if there were any other collisions
    89.             hits = Physics.SphereCastAll(ray, sphereCastRadius, originalDist + sphereCastRadius);
    90.         }
    91.        
    92.         // sort the collisions by distance
    93.         Array.Sort(hits, rayHitComparer);
    94.        
    95.         // set the variable used for storing the closest to be as far as possible
    96.         float nearest = Mathf.Infinity;
    97.        
    98.         // loop through all the collisions
    99.         for (int i = 0; i < hits.Length; i++) {
    100.            
    101.             // only deal with the collision if it was closer than the previous one, not a trigger, and not attached to a rigidbody tagged with the dontClipTag
    102.             if (hits[i].distance < nearest && (!hits[i].collider.isTrigger) && !(hits[i].collider.attachedRigidbody != null && hits[i].collider.attachedRigidbody.CompareTag(dontClipTag))) {
    103.                
    104.                 // change the nearest collision to latest
    105.                 nearest = hits[i].distance;
    106.                 targetDist = -pivot.InverseTransformPoint(hits[i].point).z;
    107.                 hitSomething = true;
    108.             }
    109.         }
    110.        
    111.         // visualise the cam clip effect in the editor
    112.         if (hitSomething)
    113.         {
    114.             Debug.DrawRay(ray.origin, -pivot.forward * (targetDist + sphereCastRadius),Color.red );
    115.            
    116.            
    117.             // hit something so move the camera to a better position
    118.             protecting = hitSomething;
    119.             currentDist = Mathf.SmoothDamp(currentDist, targetDist, ref moveVelocity, currentDist > targetDist ? clipMoveTime : returnTime );
    120.             currentDist = Mathf.Clamp(currentDist,closestDistance,originalDist);
    121.             cam.localPosition = -Vector3.forward * currentDist;
    122.            
    123.         }
    124.         else{
    125.            
    126.             //If we are between the limits of our zoom vars...
    127.             if((camPos.z <= zoomMin) && (camPos.z >= -zoomMax)){
    128.                 //...apply the new position
    129.                 cam.localPosition = camPos;
    130.             }
    131.            
    132.         }
    133.        
    134.     }
    135.    
    136.    
    137.     // comparer for check distances in ray cast hits
    138.     public class RayHitComparer: IComparer
    139.     {
    140.         public int Compare(object x, object y) {
    141.             return ((RaycastHit)x).distance.CompareTo(((RaycastHit)y).distance);
    142.         }  
    143.     }
    144. }
     
  29. fred_gds

    fred_gds

    Joined:
    Sep 20, 2012
    Posts:
    184
    Hey,

    That package seems great.

    I was wondering how the performance of the car behaves on mobile compared to UnityCar. Does anybody have any experience with that?
     
  30. adsamcik

    adsamcik

    Joined:
    Jan 13, 2013
    Posts:
    37
    Hi,
    Are you going to release update for this package for the open beta of Unity 4.6 or you'll wait for the final release?
     
  31. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Yes the beta version is coming I am just waiting on the asset store art for it to upload.
     
    adsamcik likes this.
  32. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    So there seems to be a problem with the asset store tools in unity 4.6. The relevant people know about it so as soon as there is a fix for this I will get the new version uploaded for everyone.
     
  33. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  35. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    No succinct change log but as a general overview

    * all gui now uses the ugui system ( note that means this update will only work correctly in 4.6 )
    * cross platform input has had an overhaul
    * the fps character has been dramatically simplified with lots of bug fixes
    * Various other bug fixes that have been reported in this thread

    Again any bugs you find or feed back is greatly appreciated.
     
  36. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    xReaper7x likes this.
  37. xReaper7x

    xReaper7x

    Joined:
    Jan 9, 2013
    Posts:
    15
    Tried using the joystick example but everytime I click on the joystick and move it the image just disappears? :(
     
  38. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    Thank you for the zip of the project.

    Most of the controller code works great with 4.3 but UAS won't let me download it without 4.6.
     
  39. Blakblt

    Blakblt

    Joined:
    Aug 9, 2014
    Posts:
    1
    The 4.6 sample assets are fantastic! I love the changes made to the first person characters, and the inclusion of a character controller based and a rigidbody based character is nice. However, I miss there being a mouse smoothing option on the FPS controllers. Any reason why this isn't included by default?
     
  40. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Hi Reaper, which scene was this in an example scene or was it using one of the prefabs in your own scene? The more info you can give me the easier it will be for me to fix it. Feel free to PM me.

    The version that I most recently linked to is for unity 4.6 and above only as it uses the new gui system which is only available from unity 4.6 onwards

    Thank you. With the newer version I have been trying to strip the assets back as much as possible to simplify the scripts. I could certainly add mouse smoothing back in, I'll add it to my TODO's.

    Just and FYI I am out of office next week, but the week I get back I will get fixes in and then I intend to update as often as possible.
     
  41. adsamcik

    adsamcik

    Joined:
    Jan 13, 2013
    Posts:
    37
    What is the main difference between FPC and rigidbody FPC?
    I am not sure that letting the character do the one last step before stopping is good idea. It feels at least to me like the character has quite a delay. It causes issue when I am trying to stop near the edge of something.
     
    Last edited: Aug 30, 2014
  42. DSebJ

    DSebJ

    Joined:
    Mar 30, 2013
    Posts:
    101
    Why does the FPS character update the velocity directly rather than use an AddForce function?

    *Edit*

    Updated to the latest version, which does use AddForce :)
     
    Last edited: Sep 1, 2014
  43. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    tested on beta 4.6, builded to my ipad mini, i dont see any touch control active.
     
  44. Deleted User

    Deleted User

    Guest

    I am so happy!!

    So I can use this, in my project?...because your prop aircraft scripts/rig..well, it is just fantastic!!!

    All I can say is wow, this will bring my existing game, to that next level.

    My number 1 user complaint, "bad physics"...I was basically throwing a box w/ a rigidbody around the screen.. $100.00 on simulators, month's of work, and today I finally downlaod this gem!

    This really, blows them away,smooth, fast, clean, and if I encounter problems, I can fix them, because of the well written code, and it is easily extendable..and made it extremely easy to plugin to my existing flying AI, to boot!!

    but wait there is more!! a wind sound script? I could not figure out how, to pull that one off, had some ideas.

    The 6 new WW2 planes I created in the last 3 months, were like, made, for this system..how did you know? Making my planes rigged, animating the controls surfaces,getting ready to set a state machine, but not knowing where to start..all landing gear animated..(I have less draw calls, than separate control surfaces, important for me w/ many planes on screen in android)

    Serendipitous...

    I have been promising "improved flight physics", tried a couple solutions..with nothing to deliver, I gave up. leaving my user base, waiting .., moved on..

    No longer..I am back!

    Tried this for 15 minutes, went through all the scripts, Easily a hundred dollar asset.
    what is the catch?? ;-)

    Thank you..really...so much..from my heart, and pocket book!

    Patrick Force
     
    Last edited by a moderator: Sep 1, 2014
  45. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    I understand that, my comment was meant in the sense that the logic code (non-GUI stuff) of the FPC is indeed compatible with 4.3 without any hitch and that having a .zip version of the standard assets allows developers to just hand-pick what they require without having to upgrade to 4.6. Oh the joys of being version-locked...
     
  46. DSebJ

    DSebJ

    Joined:
    Mar 30, 2013
    Posts:
    101
    Just curious, in the RigidbodyFirstPersonController why is there an explicit call to make the rigidbody sleep?

    Code (CSharp):
    1. if (!jumping && input.x == 0f && input.y == 0f && RigidBody.velocity.magnitude < 1f)
    2. {
    3.     RigidBody.Sleep();
    4. }
    According to the doc's this should be done transparently already?

    "Once a rigidbody is moving at less than a certain minimum linear or rotational speed, the physics engine will assume it has come to a halt. When this happens, the object will not move again until it receives a collision or force and so it will be set to “sleeping” mode." .... "For most purposes, the sleeping and waking of rigidbodies happens transparently."
     
  47. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    The explicit call is to stop the controller sliding down slopes. Rather than switching out physics materials which was causing problems. Having it controlled directly in script also means that you are not overriding the global value in the physics manager as you may not want other objects in your scene to have the same behavior.
     
  48. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    The FPC is based on the character controller that is built into unity. There is a lot of functionality built into that component so it made sense to provide an example of how to use it. It comes with the downfall that it does not react with rigibodies so you have to use a callback to add forces to other objects when you collide with them. The rigidbody fps is using a rigidbody solution so all the physics is handled for us, we just have to provide the forces to the rigidbody to make it move.
     
  49. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    Please provide more information this does not give me enough to go on to pinpoint the issue, For example what scene did this happen on?
     
  50. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    i tested it on the third person controller scene, i only added this one to the build settings, launched on ipad without modification