A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Now in Beta! Get 1:1 live lessons on any Unity topic or help troubleshooting your project – Connect with an expert on Unity Live Help
Discussion in 'Works In Progress' started by Marcos-Schultz, Aug 8, 2018.
Marco this looks great, keep up the great work
Could you provide me with the 3D model of the vehicle you have?
I'd like to devise the suspension system in a way that works well on your model, and at the same time, is generic enough for other 3D models.
Unfortunately I cant as the model isn't mine, apologies
No problems. Anyway, I will try to create a rather generic system, to adapt to most cases.
I like the way this asset works from the video samples.
Today I thought I'll have a look at it however when I open the Scene you provided called ExtremelyStable and press play my car falls through the terrain endlessly. I can't see why this would happen given I just imported the asset and used an out of the box scene.
Any ideas? Looks like the coliders are there and it's set to use all for terrain location setting.
Hello, thank you for contacting us.
This really is weird, it should not happen. I'll try to find out what happened. Could you answer some questions so that I can try to identify the problem?
1 - Which version of Unity are you using?
2 - What version of asset 'MSVehicleSystem' are you using?
3 - Are you using any other resources together? Or is it an empty project with only my imported feature?
4 - Is there an error message on the console? Or any warning messages?
5 - Do other demonstration scenes also have this problem?
I want to try to help as much as possible, to try to discover possible errors and correct them as soon as possible.
Thanks for the reply I appreciate your help.
1- I'm using Unity Version 2018.3.0f2 Personal
2- I'm using version 3.2.5 MS Vehicle System
3- I'm using tones of other resources in the project, more than likely something is conflicting with something.. I keep all my resources I want to use in one project so I can test their integration and fix any issues I find in the C# code when there are conflicts.
I used your Import feature from the unity asset store after the download from my assets within unity.
4-No messages for compiling or in the console at all, that's what confused me so much, I was expecting some code issue or a setting I was missing, or namespace conflicts like I usually get with assets I want to integrate. I was hoping it was that my terrain needed some sort of tag etc.. but this was your demo scene so I assume the settings there are correct unless it requires some other external project setting I'm missing.
5- I tested all of your demonstration scenes and the car falls in all of them.
Just to add, none of my other scenes do this which is also really weird. There must be some physics setting that has been inadvertently changed.
I'll have a go at importing the MS Vehicle System demo's into a single project to see if I can isolate the issue given that it's not obvious to you what the cause could be.
Yeah so I just tried a new project with just your asset and bingo everything works. Looks like I'll have to go with elimination process to find where the issue is unfortunately. If I get to the bottom of the conflicting asset I'll let you know.
Anymore updates on the suspension system or any other future updates, I am really looking forward to whats next
Is "wheel Controller" 3D compatible with this plugin?
Hello. Update 3.3.0 is ready and will be available in a few days.
- The vehicles (prefabs) have been adjusted and improved.
- A warning has been added to avoid problems or errors when using the 'steeringAssist' feature.
- It is now possible to use a 'custom material' for the skidmarks of the vehicle.
- Some particles were redone.
- It is now possible to set how long it will take for the vehicle to start the engine.
- Fixed an error that was issuing an alert on the virtual joystick code.
- The wheel settings class has been reorganized and improved.
- A simple system to simulate vehicle suspension springs has been implemented.
Note: This suspension system is new and will be greatly improved according to user feedback.
I've already tried to implement compatibility with this feature, but NWH works with variable names that are very different from the default wheelCollider, and when there are updates to its code, sometimes it changes a few things.
The 'wheelCollider' component is stable, there are no changes to its code and it is integrated directly into PhysX, which allows you to use 'substeps' for the simulation of physics.
For compatibility with the 'wheelController3D' component it would have to be stable and a bit more like the PhysX standard 'wheelCollider'.
Hey Marcos, I just noticed the steering wheel rotates on the worlds axis rather than the steering wheels own axis, my steering wheel is set at an angle and as Im using it in an APC the steering wheel can has to be raised and lowered to 2 separate positions depending on if the driver drives from the inside or the upper position, it would make more sense if the steering wheel rotated on its own axis anyways as not all steering wheels are completely vertical or horizontal, can we get that fixed before you push the next update please.
Hi. Could you please add more details about your problem? The code itself always works in the object's local rotation, as you can see in the following image.
@@ I just realized that the code has redundancy. I'll remove the redundant patch in the next update.
new vehicle! It will be available as of the next update.
I’m not a coder so I can’t read it unfortunately, the issue I’m having is my steering wheel is positioned at a 45 degree angle, however the axes the steering wheel uses seems to be the world axes rather than the axes of the steering wheel itself, I can make a video later if you wish?
That would be very good. It would help me a lot to clarify your question.
<iframe width="560" height="315" src="" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Hello. Could it be possible for me to have access to this 3D model or project?
It does not make sense for the object to rotate on the global axis.
So it is meant to rotate on its own axis rather than the world axis, I think I may know why this is happening and I’ll test tomorrow and let you know
It seems to work fine when I use the Y axis, I had to preposition the steering wheels axis, not sure why its not working on the x axis however.
The X axis undergoes some unit conversions, so it's a bit tricky to work with.
So I left only the options Y and Z as possible, as shown in the image below:
Marco I am having another issue, I see since you updated the plugin the ObjectMaster has been completely removed from the speedometer prefab, it seems to be completely different and I cant seem to get it working, Once I apply the speedometer prefab I can not find anywhere to apply the gauges, Is there any documentation available on how to apply gauges and UI?
Hello. The new speedometer system for the vehicle is simpler to implement.
Simply put the prefab 'Canvas_Gauges' as the child of your vehicle, and then associate this prefab with the variable 'Speedometer> GaugesPrefab'.
If you do this, everything should already work automatically.
If you have difficulties or suggestions for me to improve the system, feel free to say so. I want to make this system simple and intuitive.
The variables are not there anymore, that's where I am having difficulty
Oh wait, I see what you mean, that's not going to work for me, With the older system you had in place I was able to move the Speedometer to a custom position, I see now it is automatically positioned for the camera, I really need to customize where I can put each UI in the virtual space, is this not possible anymore?
Just so you know the older system you had for the gauges was very VR friendly, this new system is completely the opposite, If it isn't possible to move UI to where its needed can we please have it back, it was also possible to view the UI in edit mode, now its only visible in runtime, this was a feature I found to be much better than this newer system.
Thank you very much for the feedback. It is good to know the problems that the updates sometimes bring.
I will lightly reshape this system to be compatible with the 2 options, a ready speedometer or a system equal to the old one.
Marcos that would be great, thank you so much, the old speedometer system was very VR friendly, my project is entirely done in VR, the new system breaks that feature, looking forward to your future updates, well done so far.
The system has been greatly improved. Now it is even possible to decide which model of speedometer you will use.
You may decide not to use any, use one or even both at the same time.
Fantastic, looking forward to the update
Version 3.3.3 is already available in the asset store.
- The speedometer system has been improved and a new speedometer style has been added. Now you can decide which style of speedometer you want to use, or even use both styles at the same time.
- Minor bugs regarding vehicle fuel have been fixed and some improvements have been made.
- Several prefabs have been adjusted and improved.
Marco, you have the UI for the speedometer and rpms attached on the same texture, before they were separate, is it possible to have them separate again please.
Hello, the system lets you work with one or several textures because it does not matter where the pointer is located. You can replace the background texture by 2 if you want, and everything will work just fine.
Do you think I need to make a separate template and insert it in the next update? If I have to, I can arrange it.
Ah that makes sense, I just tested and works great, Thank you Marco, I'm having an issue with the suspension heights, it maybe an easy fix but I cant figure out whats going on, I will post a video shortly for you to see my issue?
Hello. This problem is a bit strange, but I believe it's related to the mass center of the vehicle. If the vehicle colliders are disproportionate or are not well aligned, the vehicle will tilt.
Another thing, you're adjusting the center of mass of the vehicle during the game. This has no practical effect since the center of mass is computed only at the beginning of the scene to avoid unnecessary processing (this optimizes the system and makes it lighter).
Another point to note is the variable 'ForceAppPointDistance'. Whenever I used negative values for this variable, the force on the suspension turned out to be uneven, and you're using -0.25
One more thing, your 'SuspensionHardness' variable is too low. For a heavy vehicle as a tank, a minimum value would be around 70000.
OK I did some changes to what you mentioned and saw some improvements, however my vehicle is turning to the right as soon as I move forward, I checked the alignment of the wheels to the COG and found them to be set perfectly,Note there is no warning in the Console, this only happens when I accelerate, any idea what is happening here?
<iframe width="560" height="315" src="" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Hi. This probably occurs because your vehicle is not built in an aligned way. The wheels may not be properly aligned with the vehicle's colliders, and the center of mass may be out of the center.
Vehicles are usually built with a giant precision, the wheels are aligned and are always symmetrical, otherwise the vehicle begins to spend more of the peneus on one side than the other, and so on. This is why it is always very important to always leave the wheels, colliders and center of mass of the vehicle will symmetrical.
As for the problem mentioned in the video, it probably happens because of the steering assist. When the vehicle is not symmetrical, the assist will try to compensate for the misalignment. To solve this, just leave the variable 'SteeringWheel> SteeringAssist' at 0.
I went back, checked over and over the behavior of the wheels, believe it or not it was an xbox controller issue, not on your end, The controller seems to be pushing the wheels to the right without any input
Marco I see you have a suspension demo system in this update, is there variables to add my own suspension assets or is this just a sneak peak?
Hello. The system is a preview, but it already supports other 3D models.
As you can see in the image, I created an object representing the spring (with the pivot in the corner) and added the component (MSVSSuspensionSpring).
After that, you just have to correctly associate the components and objects with their proper variables, and things should work.
This system was introduced a short time ago, so it is fairly new. I'm waiting for feedback from users to learn how to improve this system.
Ah yes, i see, thank you Marcos, I will test this this evening.
I love it, I noticed it stretches the suspension, really clever idea, I do have a suggestion to improve the concept, let me explain, What if you could place an game object at the bottom of the spring that stays central to the wheel, for example a disc that doesn't rotate with the wheel, this will then open opportunities to future proof different types of complex wheel designs like the image I attached.
I should of said if we could place our own game asset at the end of the suspension system, that would be a great feature
Hello, this is already possible, but it requires some tweaking.
I need to pack some 3D models with separate suspension to test the system and upgrade it. For now, I need to create 2 fixed points to act in conjunction with the suspension.
Is there any plan to add support for a gear stick animation like for the steering wheel? I would like to see my gear stick shift between the gears
Any way of solving this issue?
Yes, but not too soon. There are some other demands with a little more priority.
Currently the only solution is a 3D wheel from the @NWHCoding
The 3D wheel performs well and supports 3D collisions, but will not fit with other vehicle controllers that exist in the Assets Store, only to the official driver (NWH Vehicle Physics).
Also, the wheel turns out to be somewhat unstable because it does not support substeps, but this can be adjusted if you slightly lower your TimeStep to work at 60Hz or a bit more.
If this problem is something that really bothers you, the only current solution is the NWH asset. But if it is something that is not so urgent, the standard wheelCollider will already do well in most situations.
This looks like a very good asset! There are 2 issues I have right now though, with one of them being pretty critical.
1. You can't add vehicles at runtime. Attempting to change the code is harder than it looks because of the initialization order of the mscenecontroller script and the vehicle script. This is critical. If you put 0 vehicles in the controller, it won't initialize. If you spawn the controller and vehicle at the same time, it won't work because of script execution. If you execute the initialization code in Start instead of Awake in the mscenecontroller, it won't work either. Any hints as to where I should go and change the code to work with runtime spawns of vehicles?
2. Deformation doesn't seem to work properly with custom models.You can see in the pic below that the mesh was thrown backwards without modifying the object's position (still at 0,0,0). At first I thought it was because the meshes are scaled to 100, but even with a scale of 1 this still occurs. Also, the speed of impact seems to affect the distance at which the whole mesh moves. This doesn't really bother me as I never really wanted deformation.
The MSSceneController affects many other things it probably shouldn't, such as setting the player inactive, setting the timescale to 1 on awake or modifying the audio listener's volume. So unless the game you use is purely a racing game that you just started on an empty project, you'll need to modify some scripts to make it work the way you want to.