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. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    If I Recall Correctly.
     
  2. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    It contains only a TiltInput class, very well written, but suitable to drive vehicles, but not for a x->h y->v simple axis convertion. (I mean, Horizontal mapped on acceleration.x and Vertical mapped on acceleration.y).
    But I'll se what I can do to modify that class for my needs.
    Unfortunately, it seems that mapping the two VirtualAxis ("Horizontal") and ("Vertical") and virtualAxis.Update(float value) doesn't get me any read back then with CrossPlatformInputManager.GetAxis("Horizontal").
    I don't get why.
    I map the virtualaxis like this(like the TiltInput.cs class does)
    Code (CSharp):
    1. horizontalAxis = new CrossPlatformInputManager.VirtualAxis("Horizontal");
    If I read the VirtualAxis value like this (which should be cross platform):
    Code (CSharp):
    1. float h = CrossPlatformInputManager.GetAxis("Horizontal");
    I don't get any readings, but if I catch the mapped VirtualAxes like this:
    Code (CSharp):
    1. CrossPlatformInputManager.VirtualAxisReference("Horizontal").GetValue
    I do get the correct readings.

    It's weird, I don't get it...

    Will tell more if I discover something..
     
  3. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    is it an update being performed in one of the base classes?
    It's been a while since I looked.


    wasn't there a ball rolling example thing too?

    Sigh. I'll go have a look ;)

    EDIT:

    So the MobileTiltControlRig is no good?
    Looks like it should be helpful. If only to glean the hookups.

    horizontal.JPG
    vertical.JPG



    IIRC it was the TiltThingy (TiltInput.cs) registered with the ManagerThingy (CrossPlatformInputManager.cs) at runtime.
    (EDIT: Yup)
    register.JPG


    The manager thingy (CrossPlatformInputManager.cs) derives from the abstract virtual input thingy (VirtualInput.cs). EDIT: .... (I added the real names)

    I am certain there is enough info there to trace the path of execution in both axes.

    Hope it helps.
     
    Last edited: Feb 7, 2015
  4. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    I try that approach, but it doesn't seem to work, I was trying to move the ball not with a DPAD but with accelerometer through the crossplatforminput class with my modify of TiltInput that tries to make one single class for both axes.

    Code (CSharp):
    1.  
    2. CrossPlatformInputManager.VirtualAxishorizontalAxis;
    3. CrossPlatformInputManager.VirtualAxisverticalAxis;
    4. //Usethisforinitialization
    5. voidOnEnable () {
    6. horizontalAxis = newCrossPlatformInputManager.VirtualAxis("Horizontal");
    7. verticalAxis= newCrossPlatformInputManager.VirtualAxis("Vertical");
    8. }
    9. }
    And then I update the VirtualAxis value in the Update() like this:

    Code (CSharp):
    1. horizontalAxis.Update (filteredAcc.x);
    2. verticalAxis.Update (filteredAcc.y);
    CROSS_PLATFORM_INPUT is defined in the build settings.

    But this seems to work just great in the editor with mobile plugged to USB driving with UnityRemote opened the editor.
    But when I build to the device, the accelerometer works (I have calibration at start) but seems to invert the axis (no crossplatform code involved there) and when I start the scene, the ball is deaf, it looks like VirtualAxis are not reporting or not getting updated or something.
     
  5. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    Basically, I'm not using TiltInput's:

    Code (CSharp):
    1. floatangle = 0;
    2. if (Input.acceleration != Vector3.zero)
    3. {
    4. switch (tiltAroundAxis)
    5. {
    6. caseAxisOptions.ForwardAxis:
    7. angle = Mathf.Atan2(Input.acceleration.x, -Input.acceleration.y)*Mathf.Rad2Deg +
    8. centreAngleOffset;
    9. break;
    10. caseAxisOptions.SidewaysAxis:
    11. angle = Mathf.Atan2(Input.acceleration.z, -Input.acceleration.y)*Mathf.Rad2Deg +
    12. centreAngleOffset;
    13. break;
    14. }
    15. }
    16. floataxisValue = Mathf.InverseLerp(-fullTiltAngle, fullTiltAngle, angle)*2 - 1;
    17. steerAxis.Update(axisValue);
    but simply filtering input.acceleration with a LowPass and then put acc.x and acc.y in virtual horizontal and vertical axis with the .update(float value) method.
     
  6. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    [SOLVED]
    It turned out, that MOBILE_INPUT preprocessor directive, must be enabled (editor new menu voice: Mobile Input Enable/Disalbe) in order to have it in the Project Build Settings, and that code on the father(MobileControlRig) was not enabling the child otherwise.

    In the end, I'm now using the furnished rig, not mine, but at this point I'm curios if I can make it work with my single class dual axis object.

    Thank you for the assistance Twobob,
     
  7. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    You are very welcome.

    Yes - one must activate that value - This is done via the menu in-game, and propagated.

    Glad you sorted it.
     
  8. sk8terboy4

    sk8terboy4

    Joined:
    Mar 29, 2013
    Posts:
    29
    I cant seem to get raycasting to work using the sample assets mouse look and the FP Character controller. It does raycast but only forward. ex. when I rotate on the y-axis it behaves fine. When i look up the raycast does not rotate on the x-axis. so the raycast doesnt follow the camera look position, only its y-axis rotation.
     
  9. markharkness

    markharkness

    Unity Technologies

    Joined:
    Nov 2, 2010
    Posts:
    176
    HI folks,

    Sorry I have not been active on here for a while, I am in different role within unity now and I don't really have time to update this forum thread as much as I would like to. I will try and set aside some time later this week to go through all the unanswered questions.
     
    twobob likes this.
  10. SuicideTheOne

    SuicideTheOne

    Joined:
    Sep 17, 2014
    Posts:
    1
    So right now I'm trying to use unity's sample car in my game. I'm tweaing it and changing to suit my needs and it works fine for the most part but now I need the car to follow another one, and for that it lacks precision. Right now I changed breaking condition to "Target Distance" and it slows down but doesn't maintain speed and when it goes too far front it turns around. I tried tweaking the values, but I just couldn't make it work, especially when target that it's supposed to follow changes speed. So, can anyone help me with this, because, honestly, right now I dont even know what to look at.
     
  11. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I have one small request: Can you please move the "Editor" folder into "Standard Assets/Editor"? That makes more logical sense, has less of a chance to interfere with other people's projects, and will cause those scripts to be compiled in the "Standard Assets Editor and Plugins Editor" phase which is where it should happen, rather than the "Editor" phase.
     
    twobob, Socrates and FiveFingers like this.
  12. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Is this also the right place to ask about Unity 5 Standard Assets issues? I'm trying to get my head around Water4 - and while I did find some documentation on this (like here and here), nowhere did I find the tiles explained. Can anyone shed some light in this? In particular: When I need a larger area with water - would I just scale it up, or should I rather create more tiles? Or does it depend (and in that case: on what?)

    Aside from that, I really like the Unity 5 Standard Assets which are based on those new Sample Assets ... currently, I'm missing some Skyboxes, though (I'd look for those under Environments).
     
  13. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Speaking of Standard Assets, I am looking for the new assets that should be installed with Unity, namely packages such as image effects and I am seeing that, I am not getting ANY of them when I go to Assets>Import Packages>...

    All I get is the old stuff which is breaking my projects... so where are the sample assets?
     
  14. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Oh, that's really weird ... did you maybe uncheck Standard Assets in the installation wizard?

    Here's what I see:

    Screen Shot 2015-02-11 at 9.04.56 AM.png
    ... I also always install "Example Project" - but that should not be necessary. Then, in Unity, I get this:

    Screen Shot 2015-02-11 at 9.07.36 AM.png
     
  15. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    using unity5 rc1 and 3rd person controller when i press jump button it spam this kinds of warnings:
    Animator has not been initialized.
    UnityEngine.Animator:SetFloat(String, Single, Single, Single)
    UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter:UpdateAnimator(Vector3) (at Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonCharacter.cs:122)
    UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter:Move(Vector3, Boolean, Boolean) (at Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonCharacter.cs:75)
    UnityStandardAssets.Characters.ThirdPerson.ThirdPersonUserControl:FixedUpdate() (at Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonUserControl.cs:71)

    and the landing transition between airbone and grounded is instantly passed, like there was no transition, any solution?

    EDIT: fixed in rc2!
     
    Last edited: Feb 22, 2015
  16. Nevulus

    Nevulus

    Joined:
    Dec 7, 2012
    Posts:
    29
    The download link on the picture is not working for me.
     
  17. ExploderMaus

    ExploderMaus

    Joined:
    Mar 1, 2015
    Posts:
    2
    Duck, thanks for the tips. I'm having a helluva time getting my wheel colliders to work.
     
  18. BIG-BUG

    BIG-BUG

    Joined:
    Mar 29, 2009
    Posts:
    457
    Some feedback to the car asset:
    The script has a bug which prevents acceleration after the car has come to a stop using the handbrake. One has to hit the regular brake/backwards button first.

    CarController.cs -> ApplyDrive()
    Code (CSharp):
    1.                 if (CurrentSpeed > 5 && Vector3.Angle(transform.forward, m_Rigidbody.velocity) < 50f)
    2.                 {
    3.                     m_WheelColliders[i].brakeTorque = m_BrakeTorque*footbrake;
    4.                 }
    5.                 else if (footbrake > 0) //<<< this one is not correct as brakeTorque never gets reset after handbrake was used.
    6.                 {
    7.                     m_WheelColliders[i].brakeTorque = 0f;
    8.                     m_WheelColliders[i].motorTorque = -m_ReverseTorque*footbrake;
    9.                 }
    In general this part of the code does not feel like the best solution - the handbrake is handled elsewhere and those hardcoded values are not too nice either.

    The car model itself has some seams in the mesh (hood) which lead to shadow artifacts and pixel artifacts
     
    twobob likes this.
  19. Philomorph

    Philomorph

    Joined:
    Jun 6, 2014
    Posts:
    3
    I'm coming late to the game, as I just downloaded this pack. I'm experiencing a weird bug when running the samples that use the virtual joystick. For example, the 2D Character platform game, when set to either Android or Windows Phone builds has the issue, as does the Rollerball project.

    Whether running in the game window in Unity with my mouse or using the remote control app from my Android tablet for touch controls, the joystick jumps out of place and into the lower left corner as soon as you let go of it.

    It's like the script for releasing the stick is forgetting the original position and defaulting to 0,0 or something. This makes the games unplayable, as you can't move the stick past the two screen edges it's on.

    Anyone else seen this? Sorry if it's been mentioned... I can't go back and read this entire thread :(
     
  20. BeerdyGlass

    BeerdyGlass

    Joined:
    Dec 30, 2014
    Posts:
    2
    I have some problem. I fixed function OnEnable () to Start () in Joystick.cs. It is helped! But I think it is a bad practice ...
     
  21. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Would be great if the Car Controller in the Vehicle pack was updated with a "CanControl" boolean and it would roll to a stop and similarly cycle the audio revs down to idle. Basically I'm using it so that I can get in/out of the vehicle. So if the vehicle is rolling and I hop out, it would be great if the revs would cycle down on their own.

    Also the Bug that someone else mentioned about regarding using handbrake and then being able to drive forward without hitting reverse first.
     
  22. ronaldomoon

    ronaldomoon

    Joined:
    Jan 24, 2014
    Posts:
    87
    I'm running into the same issue. If my character is facing the camera with a rotation of 0,180,0 and I turn to the character's left (rotating positive in the Y) until I reach 270 degrees on Y then the issue arises. If I continue rotating until I'm past (lower) than 180 then the rotation stays the same when I release the key or joystick, but if I stop rotating anywhere between 270 & 180 then it (the character controller object) snaps back to somewhere around 270. Never exactly 270, but always close.

    I've looked around elsewhere and haven't been able to come up with anything, which is weird since this has been happening since I first downloaded the Sample Assets beta something like a year ago and the issue still persists in Unity 5's standard assets. It happens even in a completely clean project with nothing other than the characters assets, using any sort of camera. Unless this is fixed, this controller can't really be used in a game. No one wants to play a game where their character inexplicably makes 90 degree turns.

    Edit: I think it is worth noting that this does not happen when rotating a character in the opposite direction on the Y axis.
     
    Last edited: Mar 13, 2015
  23. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I've seen that issue in Unity 5. Thought it was something I was doing wrong since I started modifying the controller code, and never quite got round to fixing it because the project I was working on got cancelled.

    In theory I doubt it is all that hard to track down and solve, if I get time in the next week I will take a look. Off the top of my head someone might want to go through the code, disabling certain parts to narrow the issue down. For example I seem to recall there is some function called ExtraRotation (or words to that effect) which could be a potential candidate.
     
  24. ronaldomoon

    ronaldomoon

    Joined:
    Jan 24, 2014
    Posts:
    87
    Honestly, a lot of the code controlling the rotation is beyond my ability to understand right now. I did comment out the 'ApplyExtraRotation' function as suggested and that resulted in the character not being able to turn at all, which I find to be a bit odd since that's just supposed to be extra rotation that's added to the root rotation. But again, I don't claim to fully understand any of it.

    And just to save others a few seconds, I have already tried keeping root motion disabled through the script and that doesn't help either.

    **Edit**: Fixed thanks to redditor /u/Vic-Boss! All you need to do is go to your character's HumanoidIdle animation in the AnimatorController, inside of the Locomotion blend tree. Then turn on editing, and uncheck "bake into pose" under "Root Transform Rotation". Hit apply and then it should behave normally!
     
    Last edited: Mar 14, 2015
  25. ronaldomoon

    ronaldomoon

    Joined:
    Jan 24, 2014
    Posts:
    87
    It seems that I spoke too soon. I've noticed the snapping happening again without making any changes to the animator or scripts. :-(
     
  26. pedrosanta

    pedrosanta

    Joined:
    Mar 15, 2015
    Posts:
    2
    I installed Unity 5 along with the Sample Assets, and I'm trying to import a Third Person Character onto my scene, but the package does not have any proper materials for 'Ethan', just a plain white and grey dummy material.
    Screen Shot 2015-03-16 at 15.24.19.png
    Where are the rest of the materials/textures?
     
  27. pedrosanta

    pedrosanta

    Joined:
    Mar 15, 2015
    Posts:
    2
    Ok, it seems that the 5.x Standard/Sample Assets doesn't have a coloured third person character (Ethan), just a plain white (or grey) one - I guess it is so to maintain a certain minimal aesthetic and consistent with the graphical line of promotional materials of Unity 5.0.

    I managed to add the coloured texture to 'Ethan' by downloading 4.6 Standard Assets Pack and importing Third Person Character Textures and adding the texture (EthanAlbedoSpecular.png) to the Albedo (Main Maps) of the EthanWhite material of the 5.x Assets.
    Screen Shot 2015-03-16 at 22.01.37.png
     
    twobob likes this.
  28. MagicZelda

    MagicZelda

    Joined:
    May 1, 2013
    Posts:
    90
    yes thats what i did
    yes thats what i did
     
  29. Cenda

    Cenda

    Joined:
    Jun 3, 2010
    Posts:
    66
    Same problem with joystick, it is not good that Standard Assets are not working :( OnEnable to Start is working well :) Thanks
     
  30. ccoltharp

    ccoltharp

    Joined:
    Apr 1, 2015
    Posts:
    5
    Having problems with the standard assets in Unity 5 on mobile devices/Unity Remote app. I just upgraded to 5 and imported the Cameras, Characters, CrossPlatformInput, Prototyping, Utility, and Vehicles packages. I switched the platform to "mobile" and created a new scene. Dropped in a floor, character, freelook camera, and dual touch controls prefabs. "Mobile Input" is enabled. I've selected my device in the Editor (tried on iPad 3 and iPad Air) and pressed play.
    It loads fine onto my iPad, but none of the touch controls work. I've tried it on the FP, 3PC, and rollerball characters. I've tried the mobile single stick and dual stick. I get no reaction after touching the touch screen areas or joystick controls on the iPad. Ethan just shifts his feet, as impatient as I am at my desk. Help me, Super Unityman!
     

    Attached Files:

  31. PietroMaker96

    PietroMaker96

    Joined:
    Feb 9, 2015
    Posts:
    4
    Hi, i have read your Guidelines for change the 3d model of the car. but i can found "CarPrefabEmpty".
    Can you help me?

    Sincerly, Pietro.
     
  32. CyberScopes

    CyberScopes

    Joined:
    Oct 25, 2014
    Posts:
    7
    Hi,

    Sorry if this has already been asked. With the unity 5 standard assets touchpad prefab (Dual Touch Controls), the swipe movement acts a bit weird. If i swipe across the touchpad, the input is fine but if i slowly swipe through the touchpad, it becomes ultra sensitive. e.g. when i do a normal full swipe i can rotate my character once but when i do it slowly i can rotate 3+ times.

    Is this an issue or have i done something wrong? Ive been trying to find the problem but havent found anything wrong so far.

    Thanks in advance.

    EDIT: Eventually ended up fixing it after a lot of changing. Ended up being an issue with normalizing the values.
     
    Last edited: Apr 9, 2015
  33. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Hi guy's,

    I am having problem to get the 3d buzz third person tutorial to work with mecanim, what i want is to have the Ethan character and animation to work with the 3d buzz script.

    Only the idle is playing correctly but when i press the move key the animation will not play, i try to fiddle with the animator but it still not working.

    Do i have to write another separate script to make the animation work?

    Regards Peter
     
  34. PietroMaker96

    PietroMaker96

    Joined:
    Feb 9, 2015
    Posts:
    4
    UP
     
  35. odival

    odival

    Joined:
    Jun 11, 2014
    Posts:
    57
    This may be a dumb question but, can we use the sample assets in commercial games?
    Also, can we modify the 3d models (like the Third Person or the astronaut girl in RobotLab) using 3d modelling software like Blender (deleting some parte of the mesh, or maybe adding another)?
     
    Last edited: Apr 17, 2015
  36. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    From the Asset Store description: "This collection of assets, scripts, and example scenes can be used to kickstart your Unity learning or be used as the basis for your own projects." So it sounds like you can. Unless otherwise stated by the developer, use of assets from the Asset Store are subject to their EULA, which can be found here: http://unity3d.com/legal/as_terms.
     
    odival likes this.
  37. mutkanz

    mutkanz

    Joined:
    May 9, 2015
    Posts:
    1
    Hello there. So I started using this pack to kickstart myself learning it. Upon checking http://files.unity3d.com/benp/SampleAssetsWebplayer/ everything is smoothly as I like. Upon further investigation on my project, somehow my car doesnt use gear system.
    Although carGUI cant be soemhow implemented or im way too lack of information.

    Hints? Thanks.
     
  38. OmerMuratli

    OmerMuratli

    Joined:
    Mar 11, 2014
    Posts:
    2
    Hi there, I've been trying to modify the WaypointCircuit script to stop being a circuit and to have start and end point to it. I am using Aeroplane controller script for my project and I want the AI controller to handle the landing part. So far I can't seem to get anywhere. Would you be so kind enough to help me with this issue? Any help would be great even a slightest push to the right direction.

    Thank you
     
  39. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    195
    I dont understand why this script has a "Array.Sort(hits, rayHitComparer);" and an extra loop to check all the collisions for which is the nearest point. And it checks all points, without using the nature of such a sorted array. I would put a break; into the array after he found the first point which is nearer than infinity, because all other points in that array wont be nearer than the first point in that array because of the sorting. Or just check the first entry in that array. Which sense does it make to use the sort method whithout using its benefits? Maybe im just wrong and cant see it, if so could someone explain it to me? :)
     
    twobob likes this.
  40. hergo97

    hergo97

    Joined:
    Dec 18, 2012
    Posts:
    23
    Any solution for the in-air control of the third person controller?
     
  41. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
  42. hergo97

    hergo97

    Joined:
    Dec 18, 2012
    Posts:
    23
    Yeah...but that is not the same controller.
     
  43. Rhannon

    Rhannon

    Joined:
    Jul 16, 2015
    Posts:
    1
    I've had the same problem with my android device. I found that a two-finger swipe across the touch areas seems to work. I haven't figured out how to get it to recognize a single-finger swipe, yet. Has anyone else been able to figure it out?
     
  44. ARLG

    ARLG

    Joined:
    Mar 5, 2015
    Posts:
    11
    I try to use waypointcircuit for my project, but I need just for one lap, not a loop circuit, how can I do ?
     
  45. Wolfsshadow

    Wolfsshadow

    Joined:
    Aug 14, 2012
    Posts:
    14
    I was unable to find it by reading through this, but I have been having a terrible time finding where in the code you have the aircraft automatically accelerating. I found the air brakes, but am trying to modify it so you have to actually throttle up prior to it taking off. Any help would be greatly appreciated!
     
  46. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    I don't like that first person controller and third person controller are that different. You could have designed them the same way.
     
  47. guitarxd

    guitarxd

    Joined:
    Nov 17, 2014
    Posts:
    3
    I'm walking through the Merry Fragmas tutorial now and I'm wondering if anyone can help me out with the FPS Character Controller script. The free sample asset package has been updated since the tutorial came out and I'm not sure where to type the gun animation code since the script looks different than the tutorial.
     
  48. guitarxd

    guitarxd

    Joined:
    Nov 17, 2014
    Posts:
    3
    I'm stuck on the same problem, can you post your Character Controller Script? I'd love to see it, I think it could help me out. I'm not sure where to type animator bool code
     
  49. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Is there any way to get the Jet (AircraftJet2Axis) to do a loop-the-loop?
     
  50. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hey,

    Does anyone know why for the car demo the tire skid effects work fine in the editor, but when you compile them on an iPhone6 the skid marks turn out all black?

    I tried all the various shader permutations, but with no joy :(

    Any pointers well received :)

    thanks

    Nalin