Search Unity

Controller MS Vehicle System (Vehicle controller)

Discussion in 'Tools In Progress' started by Marcos-Schultz, Aug 8, 2018.

  1. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Hello, is it possible to place the player model into vehicle when driving it? Just a sitting pose character which is visible when driving?!
     
  2. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Yes. This is a very simple thing to do, I can create a code for you in just a few minutes.

    Could you tell me which version of the asset you are using?
     
  3. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    New tutorial from asset version 3.4.0. A lot has changed!




    This update will soon be available in store. The changes were as follows:
    ...............[Version 3.4.0]...............
    - The scene controller has been completely rewritten and enhanced!
    - Now the scene controller is created automatically when setting up any vehicle.
    - You no longer need to associate vehicles with a list on the central controller. The controller will do this automatically at any time.
    - Now vehicles can be instantiated and deleted in real time.
    - Now the player can be instantiated or deleted in real time.
    - Vehicles can now be controlled by any external code to enable AI creation.
    - There is no longer a need to have vehicles in the scene, this makes it possible to instantiate or delete vehicles at any time.
    - The input system has been completely rewritten to facilitate ease of use and remotely controlled vehicles.
    - It is now possible to attach to the vehicle a mesh that represents the player. This mesh will be activated or deactivated automatically when the player is inside the vehicle.
    - A simple example of AI is now included in the system to show a simple way to control the vehicle through other codes.
    - New demo scenes have been created.
    - The documentation has been updated.
     
    Grumpy-Dot likes this.
  4. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,831
    Hello, I 'm using the free version of the asset for now.
    I noticed that in all of the vehicle prefabs, the MS Vehicle Controller has swapped the serialization of the left vs right wheels.
    Ex: the vehicle's left wheels have been serialized to the right wheel related variables in the MS Vehicle Controller attached to the vehicle, and vice-versa.
    Is this intended, or should I correct this issue on my end?
    Thanks
     
  5. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, this should not happen. Probably when I simplified the PRO o version and rebuilt the vehicles, I inadvertently reversed it.

    Although this does not affect the free system at all (there are differences only in the PRO version because of the differential).
     
    ArachnidAnimal likes this.
  6. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Feature update to version 3.4.2

    ...............[Version 3.4.2]...............
    - The [DisallowMultipleComponent] command has been added to the main code to prevent multiple components in vehicles.
    - A bug was fixed where skidMarks were not generated if wheelMeshes were not associated in their respective variables.
    - Added a new method of distortion for vehicle meshes, allowing the mesh to warp toward the center of mass.
    - Meshes deformation has been improved and simplified.
    - The camera system has been updated and improved overall.
    - A bug has been fixed where vehicle cameras incorrectly detected collision in collisers marked 'isTrigger'.
    - Enhancements have been made to the 'FirstPerson' and 'ETS' cameras, adding a new style of automatic movement to make the simulation more realistic and immersive.
     
  7. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Marcos-Schultz likes this.
  8. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, thanks for contacting us to resolve your issue.

    Could you send me a copy of this asset by personal message so I can see where the problem is?

    Usually no vehicle is dragged by custom controllers because the mass of the vehicles is very large (usually between 1000 and 2000). But depending on the method used by this other asset to move the controller, things may change slightly.

    I need to know how this controller moves so that I can know how to solve the problem.
     
  9. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    I emailed you
     
    Marcos-Schultz likes this.
  10. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    The entire UI is being revamped and improved.

    Several aspects have been improved and redefined, as have the quality of the images. News is coming in version 3.4.5

     
  11. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    New UI interface and new bookmarks. Just some news of version 3.4.5.

     
    Delforce and Grumpy-Dot like this.
  12. FormalSnake

    FormalSnake

    Joined:
    Oct 26, 2019
    Posts:
    12
    Once i start my game using this asset, my car disappears.
     
  13. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, how are you?

    Say, are you using the free version or the paid version of the product?
    Another question ... when the vehicle is automatically deactivated, an error message appears informing you of what happened. Could you tell me what this error message is?
     
  14. FormalSnake

    FormalSnake

    Joined:
    Oct 26, 2019
    Posts:
    12
    i am using the free version and i get this error:
    There must be an object with the 'MSSceneController' component so that vehicles can be managed.
    UnityEngine.Debug:LogError(Object)
    MSVehicleControllerFree:DebugStartErrors() (at Assets/MSVehicleSystem(FreeVersion)/Scripts/MSVehicleControllerFree.cs:495)
    MSVehicleControllerFree:Awake() (at Assets/MSVehicleSystem(FreeVersion)/Scripts/MSVehicleControllerFree.cs:484)
     
  15. FormalSnake

    FormalSnake

    Joined:
    Oct 26, 2019
    Posts:
    12
    There
    There is a smiley because the error says : D
     
  16. FormalSnake

    FormalSnake

    Joined:
    Oct 26, 2019
    Posts:
    12
    now i added the scene manager i get:
    Vehicle selected to start does not exist in the 'vehicles' list
    UnityEngine.Debug:LogError(Object)
    MSSceneControllerFree:Awake() (at Assets/MSVehicleSystem(FreeVersion)/Scripts/MSSceneControllerFree.cs:145)


    There is no vehicle in the scene or no vehicle has been associated with the controller.
    UnityEngine.Debug:LogError(Object)
    MSSceneControllerFree:Awake() (at Assets/MSVehicleSystem(FreeVersion)/Scripts/MSSceneControllerFree.cs:149)


    This vehicle can not be controlled because it is not associated with the vehicle list of the scene controller (object that has the 'MSSceneController' component).
    UnityEngine.Debug:LogError(Object)
    MSVehicleControllerFree:DebugStartErrors() (at Assets/MSVehicleSystem(FreeVersion)/Scripts/MSVehicleControllerFree.cs:509)
    MSVehicleControllerFree:Awake() (at Assets/MSVehicleSystem(FreeVersion)/Scripts/MSVehicleControllerFree.cs:484)
     
  17. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello. In the PRO version, everything is automatic and always works.

    In the free version, it is necessary to associate the vehicles of the scene in the list of the general controller.

    In the object called 'Control', there is a list called "Vehicles". You must associate all vehicles in the scene that have the code "MSVehicleControllerFree" in that list, and everything will work.
     
  18. FormalSnake

    FormalSnake

    Joined:
    Oct 26, 2019
    Posts:
    12
    now it works but my car flies away or it doesn't drive
     
  19. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello.

    Did you follow the documentation to create a vehicle correctly, putting Rigidbody, collider and everything?

    Perhaps this video of the Pro version will help build a vehicle.

     
  20. MaxDeveloping

    MaxDeveloping

    Joined:
    Nov 30, 2019
    Posts:
    5
    Hello Forum!

    I just wanted to quickly ask if anyone have tried a iOS build with MS Vehicle System?
     
  21. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello. Some customers have already compiled for IOS and everything worked fine, as the system uses the Unity UI, so just compile for IOS and things should work the same way they work on any Android device.
     
  22. MaxDeveloping

    MaxDeveloping

    Joined:
    Nov 30, 2019
    Posts:
    5
    Great! Thanks for the reply
     
  23. isNewBird

    isNewBird

    Joined:
    Mar 27, 2019
    Posts:
    20
    Hello, may I ask why my newly built car is always running in low gear and can't automatically shift to high gear?I'm currently in auto gear.I will only run in low gear after I adjust it to imitate your existing vehicle parameters. Why?I'm asking for your help. Thank you
     
    Marcos-Schultz likes this.
  24. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, thank you for contacting us to resolve your question.

    If your vehicle is not able to move up, this is probably a problem related to vehicle scale. Watch the video below ... the vehicle must have correct scales for Unity physics to act accordingly.



    Would it be possible for you to send some prints showing how you are configuring the vehicle? A short video? Or maybe, the project? This would help a lot so that I can solve your problem as soon as possible.
     
  25. isNewBird

    isNewBird

    Joined:
    Mar 27, 2019
    Posts:
    20
    Hello, I have seen the video you sent.That's how I set it up.But it's still stuck in low gear.

    Below is a picture of my car.thank you
    upload_2020-9-4_12-13-24.png
    upload_2020-9-4_12-14-39.png
     

    Attached Files:

    Marcos-Schultz likes this.
  26. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Would it be possible for you to send this project to me so that I can analyze it?

    From what I can see in the images, perhaps the variable "VehicleTorque" is too low, and as the vehicle gains speed, the air drag increases, and the vehicle starts to require more torque in order to increase its speed. and move on to the next gear.
     
  27. muddmaster

    muddmaster

    Joined:
    Jan 27, 2019
    Posts:
    13
    with this aaset can you make a vehicle drive on top of water and then have it submerge into water to?
    I'm not to good with code:( or should i use Dynamic Water Physics 2 for that?
     
  28. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hi, could you specify in more detail what you are trying to do exactly? Do you want to simulate as if a vehicle fell into the water? Where does it stay on the surface for a while and then sink?
     
  29. muddmaster

    muddmaster

    Joined:
    Jan 27, 2019
    Posts:
    13
    I want to drive on the road like a normal car then get to the water the vehicle transforms then drives on top of the water like a jetski then takes a dive into the water and drive underneath the water like a james bond movie.
    I'm working on a prototype spy game.
     
  30. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    I'm not sure if you will be able to do this easily simply by joining Assets, as they are different things ...

    For example, vehicles work with WheelColliders, which would need to be disabled when entering the water (or not, it depends on whether the vehicle is going to be amphibious or not) ...

    I don't have a copy of the DWP2 resource ... I only have a copy of the NWH VP1 resource. So I can't test if both products are compatible. Do you have a copy of the DWP2 feature?
     
  31. Hussein_Attie

    Hussein_Attie

    Joined:
    Aug 7, 2019
    Posts:
    3
    Hello Mr.Marco, Your System is awesome, I love it! Good Job!
    So , Im trying to Add force to the vehicle rigidbody, however the Script MS Vehicle controller is prohibiting me from doing so. I want to be able to Add force to the vehicle to mimic some kind of recoil. What can I do so that Im able to add force to the vehicle rb ?
     
    Marcos-Schultz likes this.
  32. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, thank you for contacting us to resolve your question.

    In principle, the system does not prevent forces from being added to the vehicle's rigid body. You can do a very simple test:

    Create a new C # code called 'SimpleAddForce' and add the code below to it.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class SimpleAddForce : MonoBehaviour {
    6.  
    7.     public Vector3 force = new Vector3(0,10,0);
    8.     Rigidbody _rigidbody;
    9.  
    10.     void Start () {
    11.         _rigidbody = GetComponent<Rigidbody>();
    12.     }
    13.  
    14.     void FixedUpdate () {
    15.         if (_rigidbody) {
    16.             float rbMass = _rigidbody.mass;
    17.             _rigidbody.AddForce(force * rbMass);
    18.         }
    19.     }
    20. }
    Save the code and associate it with your vehicle ... You can see that the forces are applied correctly ... The vehicle will almost become a balloon with this code.
     
  33. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    Sorry for mixing this in but there is no thread for your other asset "MS Move Objects" and I have a question and from the video on the asset page is not clear.

    Can I attach the script to a camera then interact with an object, click and drag, but keep the camera still, not moving? Move only the mouse, camera should not move like fps, should not follow the mouse.

    If I have a still camera and I use the mouse to move the object around. This works?

    Also. Problem, have a 3d object in 3d world, have mouse drag an object only on a certain axis I define for example Y axis and only from position A to position B. Think something exactly like a UI slider but in 3D world.

    finally, last question, can I modify the script code?
     
    Marcos-Schultz likes this.
  34. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, thank you for contacting us to resolve your question.

    I usually answer questions about other products by email: marcos11-24@hotmail.com

    As for your doubt, it is possible to have a static camera and move 3D objects ... Just change the detection mode of the objects.

    As for modifying the codes, it is also possible ... The entire code comes with the product, and is fully customizable, so you can modify as you wish.
     
  35. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    No I didn't purchased the asset yet, wanted to know if this works, what do you mean by change the detection mode? what mode needs to be?
     
    Marcos-Schultz likes this.
  36. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Change the detection mode in the system settings interface, which is in the same Inspector.




    With this type of Raycast selected, it is possible to move objects with the mouse, without the camera moving.
     
  37. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    Awesome, that looks exactly like what i want! bought the asset now, thank you for the quick answer!
     
    Marcos-Schultz likes this.
  38. Alexander_Jarvi

    Alexander_Jarvi

    Joined:
    May 8, 2019
    Posts:
    1
    Hello! Happy New year! Our team needs help. We have chosen your physics for our game. It seems to us the best physics (similar to GTA 5). We have a question. How to make the car turn over physically? Now the car does not roll over at all. What is this problem? Help, thank you! I sent a video to your mail.
     
    Last edited: Jan 3, 2021
  39. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, thank you for contacting us to clarify your question.

    I answered you there in the email.
     
  40. PavelLangweil

    PavelLangweil

    Joined:
    Mar 4, 2014
    Posts:
    28
    I also had some weird extra "engine" sound playing when testing yesterday. Then I found out it was the "wheel collision" sound :O. It was playing constantly so it kinda sounded like an additional engine.
     
  41. Marcos-Schultz

    Marcos-Schultz

    Joined:
    Feb 24, 2014
    Posts:
    381
    Hello, are you using the free version or the PRO version of the product?
     
  42. Fess_soft

    Fess_soft

    Joined:
    Dec 28, 2022
    Posts:
    1
    Marcos-Schultz, hello! I have a question. I am using your MS Vehicle System asset tool (free version) and I do not understand in which units of measurement the torque is specified? In Newtons per meter or revolutions per minute? There is another question about manual gear adjustment: is there a manual for this adjustment? upload_2024-4-20_20-40-26.png