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

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

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

  1. RobertJon

    RobertJon

    Joined:
    Oct 29, 2013
    Posts:
    5
    Thanks for the assets guys!

    I've been playing around with the propeller plane. I'm finding it a little hard to control, since I'm really looking for an arcade plane.

    Also I think I found a bug in the altitude: after some flying it started decreasing while I was still ascending. After a while it ended up negative while I was still high in the air.
     
  2. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    @NinjaDesigns - Would you be able to send me your vehicle model so I can see the problem? I'd like to fix this for the next release.
     
  3. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    @cl-apps The current set-up assumes that you're able to use Unity Remote on mobile. If you'd like to use standalone input when a mobile build is selected in the editor, you can edit the first function in CrossPlatformInput to use Standalone as required.
     
  4. adsamcik

    adsamcik

    Joined:
    Jan 13, 2013
    Posts:
    37
    I haven't found an option for disabling character climbing so for now I just assume there is none. When I set move multiplayer to like 2 or 3, the original character climbes mountains(terrain) kinda weirdly. On speed 3 the character is climbing mountains that quickly, that he teleports. I don't know if this is intended behavior, but I think that climbing option that would disallow this fast climbing if needed. Hope you got me
     
  5. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I don't know if this is an asset bug or unity bug.
    The new 3rd person controller use root motion for the movement, and I tried to change the character with a small one then scale it bigger but it seem the scaling is ignored and the character move very slowly like if it is still small.

    Why not just make the movement in place and use a variable to set the speed? If I remember correctly in pre mecanim example this was the standard way.

    EDIT
    Code (csharp):
    1. public void OnAnimatorMove()
    2.     {
    3.         // we implement this function to override the default root motion.
    4.         // this allows us to modify the positional speed before it's applied.
    5.         rigidbody.rotation = animator.rootRotation;
    6.         if (onGround  Time.deltaTime > 0) {
    7.             Vector3 v = (animator.deltaPosition * 10 * moveSpeedMultiplier) / Time.deltaTime;
    8.  
    9.             // we preserve the existing y part of the current velocity.
    10.             v.y = rigidbody.velocity.y;
    11.             rigidbody.velocity = v;
    12.         }
    13.     }
    14.  
    Adding the scale in this function does fix it, something like
    Code (csharp):
    1. Vector3 v = (animator.deltaPosition * ObjectScale* moveSpeedMultiplier) / Time.deltaTime;
     
    Last edited: Jan 22, 2014
  6. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    I swapped the mobile input for the standard one like you suggested but the looking around movement goes a little wonky for some reason... Not entirely sure why. The same result on mobile too..
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi again, I found some more issues for you.
    Sorry for picking your nose, but... :)

    Firstly, are you sure you need to use RaycastAll in ThirdPersonCharacter.GroundCheck()? It creates an array of RaycastHit each time and hence
    allocates 68 (spikes up to a KB at times) per frame, that is a highway to GC spikes. Maybe just use a Raycast with a layer mask?

    The same kind of problem with:
    ProtectCameraFromClipWall.cd - 32B of allocation per frame,
    PlatformSpecificContent.cd - 16B from using Transform.GetEnumerator() in "foreach (Transform t in transform) {}"

    So please memory profile the code, a lot of people will be using it in their game.

    Also, in ThirdPersonCharacter there is:
    Code (csharp):
    1.  
    2. // update the current head-look position
    3. lookPos = Vector3.Lerp (lookPos, lookPos, Time.deltaTime * advancedSettings.headLookResponseSpeed);
    4.  
    That must be a typo, lerping from the same position to the same position does nothing.

    And the Ethan dude... take a look at this picture:
    $Ethan.png

    The bones are aligned in completely random directions, I didn't even know you could use a skeleton like that in Unity. That probably doesn't create a lot of problems normally, but it can hardly be called standard.

    Hope it helps, :)
    Pärtel
     
  8. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    Wondering when Unity will add NonAlloc functions to Physics (as they have with Physics2D)...
     
  9. Deleted User

    Deleted User

    Guest

    Those sample assets are awesome!

    But it would be nice to add a collider detection for the AI waypoint system.
     
  10. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    You can do that with mecanim, but wouldn't that defeat the purpose of mecanim's ability to use the animation's movement to move the character? Setting the speed yourself, usually makes the movement seem fake because often times, it's not at the speed that'll match up unless you measure the mecanim's animation or just take it from the animation's avg speed and apply it to the speed to move the character. AFAIK, (which is, sadly, not much) there isn't a way to just take that out through code, you'd have to manually look up all the animations and store them as a variable. So if you were to change out an animation, or the size of the character, that would still mess it up.
     
    Last edited: Jan 24, 2014
  11. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    Please add driver's eye view camera to cars. Please make the player shift from Drive to Reverse or Reverse to Drive when he/she wants to change direction of car.
     
  12. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    These are much better than the current Standard Assets; I'm excited to see them included. The FPS controller is the only one that is a little quirky in my opinion... running up hill launches you off and into the air as if you had jumped, similarly running and hitting a downward slope launches you forward through the air. There's an awful lot of jitter when going up or down stairs as well. The bobbing and shaking when running and jumping might also be a little too much... I felt like I was drunk. ;)
     
  13. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    Here's a bug I found, don't know how you'd solve it. (3rd person sandbox)

    If your character clips into something (in this case, namely the "Block 4x4x4" in this case) you jump 3 meters high instead of the normal roughly 1.95 ish.
     
  14. FredrikSwe

    FredrikSwe

    Joined:
    Jan 11, 2013
    Posts:
    47
    Nice controllers..

    Can you make so third person controller can strafe and walk/run backwards?
    That is what I need. Would be perfect if I got that.
     
    Tethys likes this.
  15. Rorin

    Rorin

    Joined:
    Jan 5, 2014
    Posts:
    4
    I can't download the assets!! When I click download, it just doesn't start the download... I'v waited 4-5 times and each time like 5 to 10 minutes. Thats total of 50 minutes waiting and not downloading anything :( WHY CAN'T I download them :( :( :( store is working amazingly slow!


    It's just saying - Please wait yet 15 minutes... I'm closing all my other programs, skype, utorrent, chrome, everything!!! No it just says PLEASE WAIT. And finaly now I got some sort of error in unity it says this -

    $fdaf.jpg
     
    Last edited: Jan 24, 2014
  16. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    Hi Partel, thanks for the feedback - don't worry about bothering us, this is exactly the reason we put out a beta, for such valuable feedback :)

    We used this because in our unusual case we can't use a layer mask - because users will import our package into their own projects, and we can't assume it's okay for our layer settings to override theirs, however maybe I could add a checkbox so it works either way - and users who care about GC can select a single ray result and set their layers up manually.


    Yup, that's an accidental error which I think came from refactoring some of the code near the release date :) It is supposed to have two separate variables, an intendedLookPos and a currentLookPos. Current should lerp towards intended, of course. A fix will be in the next update.


    I have forwarded this on to one of our artists, he's looking at fixing it (along with the bone weights and other problems with the character model that have been pointed out in other posts on this thread.

    Thanks for the feedback,

    - duck
     
    Last edited: Jan 24, 2014
  17. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    Thanks you guys (and everyone else I haven't quoted) for the continued feedback. I'm logging them all and hope to get fixes for most problems into the next release, before it's bundled with Unity.

    - duck
     
  18. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    $clip_jump.png

    Here's where it happens, at corners with two sides block the character. In the sandbox, you'll be able to jump on the 2nd highest 4x4x4 box, which you wouldn't normally be able to.

    Also, on the ramp, it seems you can jump up a bit higher (2.5ish meters), where you're jumping at the point where you have the box under the ramp. I think that's just because the collider got pushed it up a little higher.
     
  19. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    I still think you guys should add some space related stuff to this package ...

    Since there is and have been a lot of games made that are space related with Unity...

    One has already been mentioned ... first and third person characters that are set up to walk on spherical objects...like planets..

    Also vehicles ... like this car you guys made....but driving on a spherical object/planet..
     
  20. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    hi, thanks for the new assets and samples, they are very nice.

    i'm trying to use the car as a base for a game that i'm working on.

    i want to let the car to have an continuos and stable speed, without using the up arrow or the accel button on the touch device, i have tried puting a constant values for "AccelInput" and "currentMaxTorque" variables but the car moves with that values as a constant acceleration.

    can someone tell me where i need to check to let the car start for example at 60 mph and let it go to that speed without change it ?

    thanks in advance, and sorry if this question is out of context here.
     
  21. sistematix

    sistematix

    Joined:
    Dec 26, 2012
    Posts:
    9
    this sample assets are awesome, but i notice that this ethan character has dying animation in the stealth project, so basically i want to add the dying animation when he falls from a certain height. but i dont know how to implement it.. any help would be great, thx
     
  22. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    That dying animation would be completely odd for a fall to the death type situation. But... I guess you'd import it, add a line of code saving the transform.y of when your character starts to fall, then another saving the transform.y when he is grounded. Subtract the 2 and if it exceeds the amount you want, play his dying animation.

    In anycase, when you release this, will you release more notes/tutorials to build this so that it's easier to learn and understand what's being done and how, or will you just release it as is, kind of like angry bots, where it's built and we just play around with it?
     
  23. silver_nmy

    silver_nmy

    Joined:
    Jan 25, 2014
    Posts:
    4
    Hi there! First of all thank you for modernizing the standard assets, the beta version feels truly amazing.

    I'm especially interested in the updated version of the third person controller. One thing I wonder though is if it would be easy to modify it so it's possible to strafe and walk backwards instead of the character turning and always walking forward. If so this controller would be absolutely perfect for my game.

    Besides a few other things such as being able to walk up vertical walls (terrain) and if you're standing in a slope the character starts "vibrating" vertically sometimes I absolutely love this controller. Great work, can't wait for the final version!
     
  24. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    There is heavy aliasing in the Third Person Sandbox scene around the skybox and anything else.
    $aliasing.png

    This doesn't show up in the Scene view, but it does in the Game view, and also on a Windows export, even with the highest quality settings.

    Intel HD graphics, driver 8.15.10.2279
     
  25. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    When do we get a default cube which looks like this out of the box?
    $cube.png
     
  26. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    That's an easy one: Never.
    Your cube is extensively shaded and the shape is not anymore a cube. It looks as if there are additional vertices at the edges. It is questionable if that would even run on all platforms. You get that kind of result if you bake the lightmap, maybe you need indirect lighting (Pro only).
    You need to understand how things work to get as close as possible to your desired result.
     
  27. Falez

    Falez

    Joined:
    Jan 25, 2013
    Posts:
    1
    CrossPlatformInput.GetAxisRaw is not working as intended. The return value should be -1,0 or 1, however it is returning the same value as CrossPlatformInput.GetAxis.
     
  28. Bmarlyman21

    Bmarlyman21

    Joined:
    Sep 30, 2013
    Posts:
    1
    this is AWESOME!
     
  29. Allsaveone

    Allsaveone

    Joined:
    Jan 22, 2013
    Posts:
    8
    Thanks for the great new content to explore! i am currently looking at in the new third person controller, which i must say is much better than my own home made mecanim set up. one question is vexing me though, how do i adjust the movement speeds for running, walking, and crouching? will this require editing or adjustion the animation files?
     
  30. Deleted User

    Deleted User

    Guest

    It's a famous starting cube on first opening of UDK :D
    Your Captain Obvious.
     
  31. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Thank you, the new sample assets look really cool !
     
  32. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yes, why should Unity do the same? Imagine how a 2D game with those settings would look. And imagine the feedback of new users who find out that this doesn't just run on mobiles.
     
  33. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi duck

    Are you planning to improve the FPS controller? Like adding more basic features like crouch, and ladder climbing?! Or maybe a flashlight! :D

    Thanks anyway great pack!
     
    Last edited: Jan 27, 2014
  34. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Tried the Mobile Dual Stick Control Rig on Windows 8 and Windows 8 Store (c# xaml). Couldn't get it to work with either. Get:
    NullReferenceException ... CrossPlatformInput.RegisterVirtualAxis (.VirtualAxis axis)... CrossPlatformInput.cs 16)

    plus a whole bunch of NullReferenceExceptions in JoystickAbstract.cs and GUITexture.get_pixelInsert().

    Do you have instructions for adding to Windows Store apps?
     
  35. dberroa

    dberroa

    Joined:
    Dec 16, 2012
    Posts:
    146
    In terms of upgrading, it seems 4.3.3 breaks Windows Store Apps (Windows 8) so I know some people might not want to.

    One observation, sorry if this was said already, I noticed anything mobile wise in the sample assets has certain code sectioned off with UNITY_IPHONE, UNITY_ANDROID, or UNITY_WP8 for mobile code.

    What about Blackberry? I feel like that should be added.
     
  36. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    One more skinning issue on Ethan..

    $Screen Shot 2014-01-27 at 12.03.10 PM.png
     
  37. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    Just tried to add a motion in between jumping and grounded. The motion works however, it doesn't always jump now.

    Basically, what I did was take the crouch animation from base layer and added to a prep layer, when jump is being held, it goes into part crouch/part ground animations, and on gettonbuttonup, the character jumps. However, the character only jumps some of the time. I'm guessing that the getbuttonup, doesn't remain true enough for it to work 100% of the time, and has to be released at a certain interval.

    Anyway to make it so it'll force the jump without changing the a lot of the code?
     
  38. Wrekk

    Wrekk

    Joined:
    Jul 16, 2012
    Posts:
    51
    I don't want to be a dick, but crouching is fairly easy to implement. The flashlight is EXTREMELY easy to add, really.
    Ladder climbing on the other hand, could be hard, though it really isn't all that advanced.
     
  39. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    its really great.. especially the light shafts effect... but it would be interesting to add a third person shooter mode (not just a 3rd person cam) something like the basics of bootcamp soldier but using mecanim and IK.
     
  40. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    210
    yes, that'd be awesome indeed :eek:
     
  41. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    Okay, I just messed around with it. Took out everything, except the fact that you use GetButtonUp instead of GetButton, and that seems to be what's not working right. With GetButtonUp, jumping seems to work only like 1/3rd of the time. Debug is showing that it isn't being detected as true in frames when it fails.

    EDIT: Using Input.GetButtonUp directly works the same way as well.

    EDIT: searched the right words, and google came up with my answer, can't do it in fixedupdate. =/ So I guess I have to take it out of that.
     
    Last edited: Jan 28, 2014
  42. goodbadwolf

    goodbadwolf

    Joined:
    Feb 24, 2013
    Posts:
    2
    The AutoMobileShaderSwitch script is quite useful. However, since it uses Object.FindObjectsOfType() to find the renderers, it does not work for GOs which are disabled/inactive at the start.
    As a case in point, it cannot be used to switch the Particle/Alpha Blended Shader for the "DustStorm (mobile)" particle system.
     
  43. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    Yep that's the scene you get upon starting UDK. It's a baked lightmap, so if you move the cube, the shadow stays painted on to the floor where the cube used to be. So it would be extremely easy for Unity to ship a similar scene, but the real question is - what's the point? It's really not a very useful scene at all.

    If you really want a scene like this, you can create one in around a minute, in Unity. Here, I just made a quick video to show you:

     
  44. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    thanks for making this available.

    if i would want the CarController script to handle the steer and acceleration by an independant script, could it be something like this?

    void Update()
    {
    AImode aiscript = car.GetComponent<AImode>();
    steerInput = aiscript.steer;
    accelBrakeInput = aiscript.throttle;

    if (immobilized) accelBrakeInput = 0;

    ConvertInputToAccelerationAndBraking (accelBrakeInput);
    CalculateSpeedValues ();
    HandleGearChanging ();
    CalculateGearFactor ();
    ProcessWheels (steerInput);
    ApplyDownforce ();
    CalculateRevs();
    PreserveDirectionInAir();
    }
     
  45. FredrikSwe

    FredrikSwe

    Joined:
    Jan 11, 2013
    Posts:
    47
  46. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    @Duck
    Point taken. Didn't know the lighting was static. Thanks for the tutorial :)
     
  47. Clucini

    Clucini

    Joined:
    Sep 18, 2013
    Posts:
    1
    Not sure if this has been reported yet but i have found a Bug.
    When using the thirdperson controller and you jump and press the "Left shift" key in mid air it will move you slowly throught the air
     
  48. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    If you have steering wheel/pedal set like Logitech G27 that has separate axis for brakes, throttle, and clutch pedals, modify the "Car User Control" script so that it looks like this:

    Code (csharp):
    1.  
    2. using UnityEngine;
    3.  
    4. [RequireComponent(typeof(CarController))]
    5. public class CarUserControl : MonoBehaviour
    6. {
    7.     private CarController car;  // the car controller we want to use
    8.    
    9.  
    10.     void Awake ()
    11.     {
    12.         // get the car controller
    13.         car = GetComponent<CarController>();
    14.     }
    15.  
    16.  
    17.     void FixedUpdate()
    18.     {
    19.         // pass the input to the car!
    20.         float h = CrossPlatformInput.GetAxis("Horizontal");
    21.         float t = CrossPlatformInput.GetAxis("Throttle");
    22.         float b = CrossPlatformInput.GetAxis("Brakes");
    23.         float v = t - b;
    24.         car.Move(h,v);
    25.     }
    26. }
    27.  
    Now, how do I add buttons for Forward, Neutral, and Reverse gears? How do I make the car stop and not go into reverse when I step on the brake pedal?
     
  49. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    i have Wheel back rotation i try understand where's from
     
    Last edited: Jan 29, 2014
  50. dingosmoov

    dingosmoov

    Joined:
    Jul 12, 2005
    Posts:
    559
    I've tried to go to the web demos today from my home computer and my work computer(both 27 in iMacs) using latest Firefox and I get a "Decompression Error". Is anyone else having the same problem?