Unity Community


Page 5 of 21 FirstFirst ... 3456715 ... LastLast
Results 81 to 100 of 418

  1. Posts
    6
    Wow, the demo looks awesome !
    Dynamics feel really good both front to back and side-to-side. Smoke from front and back, skid marks even when pushed by another car, really nice sound effects, congratulations.

    So I bought it and thanks to the docs and quality of the code, was up and running in 5 minutes. +1 !

    A few questions:
    • you mention the GIT repo and download zips - these need login/password but how do we get those ? Do I send you my asset store invoice ?

    • any chance you already have hooks/vars in the code for accumulating damage in some variables ? I read elsewhere in this thread your wheels can actually get out of alignment, cool. Harsh suspension hits might give you some damage and crashing into something would get you more and flipping over more etc. If not, could you advise on how/where to implement this ?
      It might also be fun to add some particle sparks near the colliding geometry when the bottom scrapes or the car flips over. And of course nasty black smoke from the hood on frontal crashes. The same hooks/callbacks might be useful for that purpose. (Not suggesting you do all that work, just asking whether your code can call some functions that your users can implement to do this type of thing)

    • adding indicator "lights": brake, reverse, headlights, turn signals. These would really be texture changes not actual lights (at least for "daylight" driving that would be sufficient. Forgive my noob-ness, but what would be a good way to implement that ? Swapping full textures like your GenVehicleTex.tga for all combinations of on/off lights would be a lot of pixel shoveling, is there a way to do this with decal textures in Unity ? (not really a Edy Vehicle Physics specific question, sorry) -- a night time simulation would probably have to include actual unity spotlights perhaps with some halo/glare to look realistic, but I'd like to get the basic daylight texture switching done first, does anyone have examples of this ?

    • lets say I want to add "weather" to a sim, such that when it rains the road gets more slippery. Would I deal with that in Edy by dynamically modifying the Dynamic Friction on your Physic Materials for the Road ?

    • wait there isn't a Physic Material for the regular road, only for Offroad, Sand etc. or am I missing it ?

    • this is totally far out, just wondering: could the physics handle a "tire blowout", ie switch that wheel's geometry to something with smaller radius and change parameters so its a "scraping metal rim" ?


    I also noticed an earlier question on this thread about some Apple keyboards not having page up / down (specifically the new bluetooth ones). I had to look this up, but you can do page up/down (== prev/next car in the demo) using fn+up/down arrow.
    Home and End (equally without keys) can be down with fn+left/right arrow respectively.

    Again, very impressed with the functionality of Edys Vehicle Package and the ease with which I got it to work.


    PS: you might want to update the docs/wiki to mention that the rear view mirrors only work with Unity Pro in case someone misses that on this thread.
    Last edited by unitarian413; 07-27-2012 at 12:12 AM.


  2. Location
    United Kingdom
    Posts
    99
    I've been having a problem that I can't figure regarding wheels going through the mesh of other objects and not colliding.
    Could someone explain some possible reasons as to why the wheels will not collide? Here's an image to show the problem.


    image host

    I would just PM you, Edy, but I still haven't received a reply to a problem I sent you a week ago (which I have now fixed).
    Last edited by Acelondoner; 08-04-2012 at 12:26 PM.


  3. Posts
    6

    Getting 3rd party car models "Edy-Ready" - question about FBX file rotation

    Heyall -

    I am trying to get an existing model to be used with Edy's package. For example, the "Combat 4WD Vehicle" from the Asset Store - a landrover. After cleaning it up a bit and stripping out unnecessary hierarchy levels with default transforms, I have the attached asset package.

    One problem is that the model came in FBX format, which Blender does not read and I do not have 3D Studio Max to import/export. The import into unity (or the original model, I am not quite sure) cause the imported asset to have a -90 Y rotation compared to what it needs. I.e. instead of Z pointing forward, it points left and X points forward.

    This seems to be a well known problem with the FBX import into Unity workflow (based on my reading of other forum threads here on the subject) One approach is to apply the -90 Y rotation in 3DS Max, but that assumes you have that software.
    I cannot find a way to do it in Unity (but I am pretty new to this very nice package)

    Of course Edys scripts want to rotate the wheels by applying an X rotation for forward motion (on the wheel object) and a Y rotation (on the pivot object / container)

    But the model as imported (and attached to this post as a UnityPackage for reference) requires a
    - Z rotation on tire_FL for forward rotation of tire (Edy wants a X rotation)
    - Y rotation on tire_FL for steering rotation (works, for actual model, interpose another gameobject for the pivot here)

    Is this something that could be solved inside Unity and how ?

    Thanks in advance for your help / advice, hopefully it will be useful to others using Edys excellent package who are getting 3rd party car models going as well.




    PS: the original model is CC licensed by SFC Paul Ray Smith Simulation and Training Technology Center, Courtesy of ADL Repository and can be found in the Asset store by searching for "Combat 4WD Vehicle". They have a bunch of other vehicle models on the Assert store.

    PS2: FYI the back axle containing 2 wheels is modeled as a single object. That would obviously be replaced with 2 separate instances of a single wheel to complete the Edy conversion, but for the purposes of solving this question, we can just deal with the front wheels since the back can be done the same way once those work.
    Attached Images  
    Attached Files

  4. Edy Edy is offline

    Location
    Spain
    Posts
    245
    Quote Originally Posted by unitarian413 View Post
    Wow, the demo looks awesome !
    Dynamics feel really good both front to back and side-to-side. Smoke from front and back, skid marks even when pushed by another car, really nice sound effects, congratulations.

    So I bought it and thanks to the docs and quality of the code, was up and running in 5 minutes. +1 !
    Thanks!!

    you mention the GIT repo and download zips - these need login/password but how do we get those ? Do I send you my asset store invoice ?
    Send me the invoice number by email, and I'll reply you with the instructions for accessing the repository.

    any chance you already have hooks/vars in the code for accumulating damage in some variables ?
    You can check out the DeformMesh function at the CarDamage.js script. At some point (find the deform variable) it calculates the distance between each vertex's current position and their original position. You could accumulate these distances for getting a measure of the total damage of the mesh.

    adding indicator "lights": brake, reverse, headlights, turn signals. These would really be texture changes not actual lights (at least for "daylight" driving that would be sufficient. Forgive my noob-ness, but what would be a good way to implement that ?
    I've implemented this in another project by assigning the lights their own material, then having two different materials (lit / unlit) and exchanging the materials in runtime.

    lets say I want to add "weather" to a sim, such that when it rains the road gets more slippery. Would I deal with that in Edy by dynamically modifying the Dynamic Friction on your Physic Materials for the Road ?

    wait there isn't a Physic Material for the regular road, only for Offroad, Sand etc. or am I missing it ?
    The absence of physic material in the road is used to detect the type of material under each wheel. No material = road. However, you can modify the way the type of material is detected. You may want to use tags, for instance. This is implemented in the CarVisuals.js file, functions IsHardSurface (it can emit smoke and make skid noises) and IsStaticSurface (it can put skidmarks on it).

    Then, using a physic material will make the wheel to use its friction parameters. This is implemented at CarWheel.js, near the end of the FixedUpdate function.

    this is totally far out, just wondering: could the physics handle a "tire blowout", ie switch that wheel's geometry to something with smaller radius and change parameters so its a "scraping metal rim" ?
    I'd try reducing the wheel's suspensionDistance, then reducing stiffness to 0.1-0.2.

    PS: you might want to update the docs/wiki to mention that the rear view mirrors only work with Unity Pro in case someone misses that on this thread.
    Thanks for pointing it out! Done.
    Physically realist, stable and fun vehicle physics in Unity
    https://www.assetstore.unity3d.com/#/content/403


  5. Posts
    4
    (I sent Edy a private message, but I'm also posting this here hoping for a speedy response)

    I'm a part of design team from Michigan State University that is currently creating a driving game for a drivers safety program. We purchased your Vehicle Physics setup from the Asset Store a few months ago and designed most of our game using the GTA4 Truck (blue truck) that was included in the package. The other vehicles handled too realistically, and this had the handling that we desired. Once we finished up designing and creating our own custom vehicles we brought them into Unity and set them up to the best of our abilities.

    At this point, we're having wild inconsistency issues with these vehicles and how they handle. One of the largest and most frustrating issues is how the vehicles never seem to travel straight, they always pull to the left or the right and we can't figure out why! We've tried a very large number of different changes and tweaks and haven't had any luck at this point...

    Basically, we're trying to setup a number of different vehicles (SUV, Sports Car, Sedan, Compact Car and Truck) to handle in a more arcade-like fashion using your engine. The vehicles are mostly handling well, but this constant pulling to the left or right is killing us.

    Do you have any tips or advice that would help us solve this issue? We'd love to hear back from you as soon as possible!

    Thanks!

  6. Edy Edy is offline

    Location
    Spain
    Posts
    245
    Quote Originally Posted by Acelondoner View Post
    I've been having a problem that I can't figure regarding wheels going through the mesh of other objects and not colliding.
    Could someone explain some possible reasons as to why the wheels will not collide? Here's an image to show the problem.
    The package is based on the standard WheelCollider component. This component uses a single ray pointing down for detecting collisions. Thus, the wheel only collides when the object is directly under the center of the WheelCollider.

    A possible workaround I could think of for your case is to use a wheel-shaped MeshCollider for each wheel, but you may need to handle the forces colliding with it yourself.

    I would just PM you, Edy, but I still haven't received a reply to a problem I sent you a week ago (which I have now fixed).
    Too many PMs I'm catching up them now. Glad to know that you fixed the problem.
    Physically realist, stable and fun vehicle physics in Unity
    https://www.assetstore.unity3d.com/#/content/403

  7. Edy Edy is offline

    Location
    Spain
    Posts
    245
    Quote Originally Posted by unitarian413 View Post
    Edys scripts want to rotate the wheels by applying an X rotation for forward motion (on the wheel object) and a Y rotation (on the pivot object / container)

    But the model as imported (and attached to this post as a UnityPackage for reference) requires a
    - Z rotation on tire_FL for forward rotation of tire (Edy wants a X rotation)
    - Y rotation on tire_FL for steering rotation (works, for actual model, interpose another gameobject for the pivot here)

    Is this something that could be solved inside Unity and how ?
    Yes! I've tested your project and solved it as follows. This is the case for the right-front wheel:

    - Create an empty GameObject (it gets created at the root of the hierarchy). Name it JointFR for this case.
    - Make JointFR child of "Right Front Pivot" in the vehicle.
    - Set the transform for JointFR as follows: Position 0,0,0. Rotation 0,0,0. Scale 1,1,1.
    - Make the object tire_FR (the actual mesh) child of JointFR. Don't touch its transform.
    - At the vehicle's CarVisuals script, set "Mesh FR" to JointFR.

    Click Play and test that wheel to work as expected. Repeat for the other wheels.
    Physically realist, stable and fun vehicle physics in Unity
    https://www.assetstore.unity3d.com/#/content/403

  8. Edy Edy is offline

    Location
    Spain
    Posts
    245
    Quote Originally Posted by Encryption001 View Post
    (I sent Edy a private message, but I'm also posting this here hoping for a speedy response)
    Sorry, I've got too many PMs recently... trying to catch up with them.

    One of the largest and most frustrating issues is how the vehicles never seem to travel straight, they always pull to the left or the right and we can't figure out why! We've tried a very large number of different changes and tweaks and haven't had any luck at this point...

    Basically, we're trying to setup a number of different vehicles (SUV, Sports Car, Sedan, Compact Car and Truck) to handle in a more arcade-like fashion using your engine. The vehicles are mostly handling well, but this constant pulling to the left or right is killing us.

    Do you have any tips or advice that would help us solve this issue? We'd love to hear back from you as soon as possible!

    Thanks!
    All forces generated at the wheels (traction / braking / friction) are based on the vertical load on each one. Thus, if wheels are supporting different loads, they will exert different forces. This causes the vehicles not to move in a straight line. Another possible cause is differences in the parameters among left-right wheels.

    How to prevent this behavior:

    • The Center of Mass must be located at the exact center of the vehicle.
    • The WheelCollider's positions must be exactly symmetrical in the X axis.
    • WheelCollider's suspension values must be the same in each Left - Right pair.
    • Same with all the parameters at CarWheel. Must be equal in each Left - Right pair.
    • A small mass of 0.5 kg is used to simulate the driver's head movement (named OnboardCamPos or DriverFrontPivot at the demo). It doesn't seem to have a noticeable effect in the vehicles, but if this is an issue, you should place a symmetric mass at the other side for balancing the weight.
    Physically realist, stable and fun vehicle physics in Unity
    https://www.assetstore.unity3d.com/#/content/403


  9. Posts
    4
    We've gone through and made sure all of our settings are correct (at least with what you've said above) and some of our vehicles (not all of them) still pull hard to one direction. I'm thinking we might be setting up the CoM incorrectly, I can't think of what else it could be. Do you have any advice on how to properly set up the CoM?

  10. Edy Edy is offline

    Location
    Spain
    Posts
    245
    Quote Originally Posted by Encryption001 View Post
    We've gone through and made sure all of our settings are correct (at least with what you've said above) and some of our vehicles (not all of them) still pull hard to one direction. I'm thinking we might be setting up the CoM incorrectly, I can't think of what else it could be. Do you have any advice on how to properly set up the CoM?
    Create an empty GameObject inside the vehicle at the desired location of the center of mass, then assign it to the property CenterOfMass of the script CarControl.js.

    Note that modifying any of the colliders in the vehicle causes the physics to recalculate the center of mass based on the colliders' shape, ignoring any previous setting. Maybe you are assembling parts of the car at runtime? If so, you should temporarily store the position of the center of mass before altering the colliders, then restoring it after proceeding. You can see an example of this at the script CarDamage.js (search for centerOfMass).
    Physically realist, stable and fun vehicle physics in Unity
    https://www.assetstore.unity3d.com/#/content/403


  11. Posts
    1
    Please udjust the top speed of the cars to realistic.

    Regrading the coupe = 255 Km
    Realistic\gta pickup tuck= 161 KM
    Empty bus = 125 Km

    And why no brake\reverse light?


  12. Location
    Brisbane, Australia
    Posts
    157
    I am trying to setup manual gears.

    CarControl.gearInput takes the target gear from the input control. However, it doesn't seem to matter if this is gear 1 or gear 5?

    CarSound.currentGear is just a calculated gear for the current speed.

    If you have modified code for manual gears or have any thoughts, I would appreciate your help.

    From my initial look, it looks like it would be a significant task to mod the code for manual gears so they behave appropriatly (eg: Adjust torque based on rev's)

    Thx.

  13. Edy Edy is offline

    Location
    Spain
    Posts
    245
    Quote Originally Posted by Zaddo67 View Post
    I am trying to setup manual gears.

    CarControl.gearInput takes the target gear from the input control. However, it doesn't seem to matter if this is gear 1 or gear 5?

    CarSound.currentGear is just a calculated gear for the current speed.

    If you have modified code for manual gears or have any thoughts, I would appreciate your help.

    From my initial look, it looks like it would be a significant task to mod the code for manual gears so they behave appropriatly (eg: Adjust torque based on rev's)

    Thx.
    It's not so easy. The problem is the (in)famous bug at PhysX/WheelCollider, which makes the sideways grip to dramatically decrease when the torque is decreased (try enabling TractionV3 at the Sport Coupe). This causes the vehicle to loose control at high speeds. The maximum speed is limited by applying air drag. A possible solution for simulating manual gears is to have a table of air drag parameters for each gear, and apply them according to current gear.
    Physically realist, stable and fun vehicle physics in Unity
    https://www.assetstore.unity3d.com/#/content/403


  14. Location
    Brisbane, Australia
    Posts
    157
    Thanks Edy. I really appreciate the fast response. I'll try your suggestion of using air drag to simulate manual gears.

    I have been playing around with the setup of cars trying to get a racing car feel. I started with the Sport Coupe and I have been tweaking the parameters. I have been successful getting the acceleration and speed working well. But I am really struggling with the traction.

    As soon as the rear wheels lose traction any turning of the vehicle causes it to spin out wildly out of control. I am unable to setup the car control so that you have a controllable drift that gives the driver a chance to regain control. I have played with Wheel Friction parameters and other grip/friction parameters on the car control. But nothing seems to minimize the vehicle radically losing control.

    The image below shows the telemetry when the car is about to lose control. The rear wheels have lost traction and even tho the speed is a modest 53kph, a slight twitch of the wheel will spin the car.

    Is there a balance of parameters that can give you a controlled drift?

    Thx.



  15. Hi ..
    I really like Edy Vehicle Physics, but i have problem , it look like bug or something strange
    when i change parameters some times the vehicle become unstable for some reason.

    open theCity project and go to PickupBlue car ,disable then enable wheel colliders, now drive the car it will flip easily when you turn.( do this in play mode )
    same thing happen when i change car parent or when i try to change car model ,
    do you know what is the problem?
    Last edited by dreammakersgroupAdmin; 09-04-2012 at 09:25 PM.

  16. I fix it .
    it looks like i have to set center off mass again
    for some reason the center of mass on start function of CarControl does not work , i set it after some time of start function and now it is fine


  17. Posts
    8
    Hi Edy,

    I purchased your Package from Asset Store . How can i get access to GIT ?

    Thanks already .


  18. Location
    Australia
    Posts
    3
    Hi Edy. I am new to Unity. I love the Vehicle Physics it looks great. I built it into an exe so that it plays better but I kept the .unity file as well. Also I got it from Game Training. I paid $45 AU for everything I learned in the two hours of Jeff Ayling doing what he does best. Making games. lol. Anyways since I have it and I am registered to Game Training is there any chance you could help me import new vehicles into the .unity file? Thanks

    Also the version I got is a bit glitchy. It says that the city doesn't exist yet it does??
    Last edited by Luke127; 09-10-2012 at 12:05 AM.

  19. RBM RBM is offline

    Posts
    5
    Hi Edy.

    I have a problem
    I added the physics to my car but it slips too much when i turn left or right with handbrake
    I've read your Documentation and I changed the parameters
    but nothing changed!
    please help me...

    thanks in advance


  20. Location
    Russia
    Posts
    1
    Car wizard [alpha versoin] for Edy's Vehicle Physics
    Check it out now!

    Now it adapted to Need For Speed: Shift cars, but there is no problem to make it universally.
    I spend 1 day. It's alpha version and will be improved.
    Last edited by nile; 09-18-2012 at 05:16 AM.

Page 5 of 21 FirstFirst ... 3456715 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •