Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community

Showing results for tags 'car'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • unity3D | Example Projects
    • unity3D | Scripts
    • unity3D | Shaders
    • unity3D | Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • FREE FPS PROJECT
    • FPSKit Download
    • FPSKit Modifications/Tutorials
    • FPSKit WIP/Showcase
    • Discussions / Bug reports
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 26 results

  1. Third update with major improvements including sound, environment, speedometer, and more! This post includes screenshots and video. Enjoy! https://imgur.com/a/r9XJVjS
  2. New update including background ambience, car sounds, rotating camera, and license plate! Don't even ask about that weird glitch cause I don't know.
  3. Unity car game using Unity 2018.2. I have decided to step away from the realistic fps genre and try something new. Racing!11!11!1! The game is something I would like to be a mix of Forza, Grid Autosport, and Need for Speed. In the game, you will have the choice to either participate in legal or illegal races. Legal races will have designated cars to be used in the race. Illegal races will let you use whatever car you want, unmodified or modified. Would also like to add death race mode and derby mode. My hopes would be to later add special car packs consisting of cars and planes from famous tv shows (Airwolf, Ghost Busters, Night Rider, Scooby Doo) and sell them as DLC. An example of my wishes would be something like the car packs for rocket league but also added modes (death race derby etc.). Anyways without further ado, here are screenies. https://imgur.com/a/BOs0zQT
  4. Hi guys, here is a simple script for car control which contains Gears (5) No REAR Yet Stop Lights Start / Stop Engine Fuel System [Fuel consumption in relation with RPM] RPM Editable controls Simple attach the script into your can then attach the camera the sounds and the lights.. //Script By DarkStudio [NightBird] //Version 1.0.0.0 BETA using UnityEngine; using System.Collections; public class Player : MonoBehaviour { //Variables public Light LeftStop; // Left Stop Point Light public Light RightStop; // Reght Stop Point Light public Transform Car; // Your Car Model public Transform MyCamera; // Your Camera float movespeed = 0.0F; public float fuel = 1000.0F; int gas_pedal = 0; public int health = 100; // Not Used YET int rpm = 0; int gear = 1; bool isengine = false; public KeyCode addgas = KeyCode.W; public KeyCode removegas = KeyCode.S; public KeyCode clutchkey = KeyCode.Space; public KeyCode gearup = KeyCode.UpArrow; public KeyCode geardown = KeyCode.DownArrow; public KeyCode nogear = KeyCode.Alpha0; public KeyCode firstgear = KeyCode.Alpha1; public KeyCode seccondgear = KeyCode.Alpha2; public KeyCode thirdgear = KeyCode.Alpha3; public KeyCode fourthgear = KeyCode.Alpha4; public KeyCode fifthgear = KeyCode.Alpha5; public KeyCode reargear = KeyCode.Alpha9; public KeyCode startengine = KeyCode.E; public KeyCode ChangeCameraView = KeyCode.C; public KeyCode SteerLeft = KeyCode.A; public KeyCode SteerRight = KeyCode.D; public AudioClip EngineStart; public AudioClip EngineStop; public AudioClip IdleSound; public AudioClip GasPressed; public AudioClip BreakSound; void OnGUI() { GUI.Label(new Rect(5, 20, 100, 20), "RMP : " + rpm); GUI.Label(new Rect(5, 35, 100, 20), "Fuel : " + fuel); GUI.Label(new Rect(5, 50, 100, 20), "Gear : " + gear); GUI.Label(new Rect(5, 65, 100, 20), "Engine : " + isengine); } void Update() { if (fuel <= 0) { isengine = false; rpm = 0; } if (Input.GetKeyDown(startengine)) { if (isengine == false) { if (fuel >= 1.50F) { isengine = true; fuel -= 1.5F; rpm = 1000; AudioSource.PlayClipAtPoint(EngineStart, Car.position); Debug.Log("Engine ON"); } else { Debug.Log("Not Enough Fuel!"); } } else { isengine = false; rpm = 0; Debug.Log("Engine OFF"); AudioSource.PlayClipAtPoint(EngineStart, Car.position); } } if (isengine == true) { //Fuel System if (rpm <= 1000) { fuel -= 0.025F; } else if (rpm > 1000 && rpm <= 2500) { fuel -= 0.5F; } else if (rpm > 2500 && rpm <= 4000) { fuel -= 0.8F; } else if (rpm > 4000 && rpm <= 5000) { fuel -= 1.0F; } else if (rpm > 5000) { fuel -= 1.9F; } //End Fuel //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //Steer Syste if (Input.GetKey(SteerLeft)) { if (movespeed <= 0) { } else { if (movespeed > 0F && movespeed <= 50F) { Car.transform.Rotate(Vector3.down, 2F); } else if (movespeed > 50F && movespeed < 90F) { Car.transform.Rotate(Vector3.down, 1.3F); } else if (movespeed > 90F) { Car.transform.Rotate(Vector3.down, 0.9F); } } } if (Input.GetKey(SteerRight)) { if (movespeed <= 0) { } else { if (movespeed > 0F && movespeed <= 50F) { Car.transform.Rotate(Vector3.up, 2F); } else if (movespeed > 50F && movespeed < 90F) { Car.transform.Rotate(Vector3.up, 1.3F); } else if (movespeed > 90F) { Car.transform.Rotate(Vector3.up, 0.9F); } } } //End Steer //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //Gas System if (Input.GetKey(addgas)) { if (gas_pedal <= 100) { if (movespeed <= 0) { if (gear == 1) { Car.transform.Translate(Vector3.forward * Time.deltaTime * movespeed); gas_pedal += 1; Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + fuel); Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + gear + " " + rpm + " " + fuel); AudioSource.PlayClipAtPoint(GasPressed, Car.position); } else { isengine = false; AudioSource.PlayClipAtPoint(EngineStop, Car.position); } } else { Car.transform.Translate(Vector3.forward * Time.deltaTime * movespeed); gas_pedal += 1; Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + fuel); Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + gear + " " + rpm + " " + fuel); AudioSource.PlayClipAtPoint(GasPressed, Car.position); } } else { Car.transform.Translate(Vector3.forward * Time.deltaTime * movespeed); Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + gear + " " + rpm + " " + fuel); AudioSource.PlayClipAtPoint(GasPressed, Car.position); } } else { if (gas_pedal > 0) { Car.transform.Translate(Vector3.forward * Time.deltaTime * movespeed); gas_pedal -= 1; Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + gear + " " + rpm + " " + fuel); } } if (Input.GetKeyDown(firstgear)) { gear = 1; } else if (Input.GetKeyDown(seccondgear)) { gear = 2; } else if (Input.GetKeyDown(thirdgear)) { gear = 3; } else if (Input.GetKeyDown(fourthgear)) { gear = 4; } else if (Input.GetKeyDown(fifthgear)) { gear = 5; } else if (Input.GetKeyDown(nogear)) { gear = 0; } if (Input.GetKey(removegas)) { LeftStop.enabled = true; RightStop.enabled = true; if (gas_pedal > 0.0F) { gas_pedal -= 1; AudioSource.PlayClipAtPoint(BreakSound, Car.position); } } else { LeftStop.enabled = false; RightStop.enabled = false; } //End Gas //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //RMP System if (gas_pedal >= 10 && gas_pedal <= 20) { switch (gear) { case 0: rpm = 3000; movespeed = 0.0F; break; case 1: rpm = 1800; movespeed = 8.0F; break; case 2: rpm = 1500; movespeed = 12.0F; break; case 3: rpm = 1200; movespeed = 5.0F; break; case 4: rpm = 1100; movespeed = 3.0F; break; case 5: rpm = 800; movespeed = 0.3F; break; case 9: rpm = 1700; movespeed = -9.0F; break; } } else if (gas_pedal < 10) { switch (gear) { case 0: rpm = 2000; movespeed = 0.0F; break; case 1: rpm = 1200; movespeed = 8.0F; break; case 2: rpm = 1000; movespeed = 12.0F; break; case 3: rpm = 800; movespeed = 5.0F; break; case 4: rpm = 400; movespeed = 3.0F; break; case 5: rpm = 200; movespeed = 0.3F; break; case 9: rpm = 1200; movespeed = -9.0F; break; } } else if (gas_pedal > 20 && gas_pedal <= 40) { switch (gear) { case 0: rpm = 5000; movespeed = 0.0F; break; case 1: rpm = 2800; movespeed = 14.0F; break; case 2: rpm = 2300; movespeed = 17.0F; break; case 3: rpm = 1800; movespeed = 24.0F; break; case 4: rpm = 1600; movespeed = 20.0F; break; case 5: rpm = 1200; movespeed = 15.0F; break; case 9: rpm = 2200; movespeed = -15.0F; break; } } else if (gas_pedal > 40 && gas_pedal <= 60) { switch (gear) { case 0: rpm = 7000; movespeed = 0.0F; break; case 1: rpm = 4500; movespeed = 18.0F; break; case 2: rpm = 2900; movespeed = 25.0F; break; case 3: rpm = 2400; movespeed = 35.0F; break; case 4: rpm = 2000; movespeed = 46.0F; break; case 5: rpm = 1700; movespeed = 56.0F; break; case 9: rpm = 4500; movespeed = -30.0F; break; } } else if (gas_pedal > 60 && gas_pedal <= 80) { switch (gear) { case 0: rpm = 9000; movespeed = 0.0F; break; case 1: rpm = 6500; movespeed = 24.0F; break; case 2: rpm = 4500; movespeed = 38.0F; break; case 3: rpm = 4000; movespeed = 75.0F; break; case 4: rpm = 3600; movespeed = 95.0F; break; case 5: rpm = 3000; movespeed = 120.0F; break; case 9: rpm = 4800; movespeed = -35.0F; break; } } else if (gas_pedal > 80 && gas_pedal <= 90) { switch (gear) { case 0: rpm = 14000; movespeed = 0.0F; break; case 1: rpm = 8700; movespeed = 32.0F; break; case 2: rpm = 7800; movespeed = 50.0F; break; case 3: rpm = 6700; movespeed = 106.0F; break; case 4: rpm = 4200; movespeed = 120.0F; break; case 5: rpm = 3800; movespeed = 140.0F; break; case 9: rpm = 5200; movespeed = -48.0F; break; } } else if (gas_pedal > 90 && gas_pedal <= 100) { switch (gear) { case 0: rpm = 17000; movespeed = 0.0F; break; case 1: rpm = 12700; movespeed = 42.0F; break; case 2: rpm = 8500; movespeed = 60.0F; break; case 3: rpm = 7400; movespeed = 126.0F; break; case 4: rpm = 5700; movespeed = 140.0F; break; case 5: rpm = 5200; movespeed = 180.0F; break; case 9: rpm = 8400; movespeed = -68.0F; break; } } //End RMP //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // AudioSource.PlayClipAtPoint(IdleSound, Car.position); } else { if (Input.GetKey(SteerLeft)) { if (movespeed <= 0) { } else { Car.transform.Rotate(Vector3.down, 0.4F); } } if (Input.GetKey(SteerRight)) { if (movespeed <= 0) { } else { Car.transform.Rotate(Vector3.up, 0.4F); } } LeftStop.enabled = false; RightStop.enabled = false; if (movespeed > 0) { if (!isengine) { Car.transform.Translate(Vector3.forward * Time.deltaTime * movespeed); movespeed -= 1.0F; Debug.Log("GAS PRESSED " + movespeed + " " + gas_pedal + " " + gear + " " + rpm + " " + fuel); } } } } }
  5. I need drift car physics. like this game http://tr.y8.com/games/burnout_drift_hilltop. I can pay . Please contact me. (osmanyilmazturk32@gmail.com)
  6. Hello my friends My new Improve Asset ISMART Car A.I! https://www.assetstore.unity3d.com/...FAwTG5toziV8R7TFLs15ycYQWhTk#!/content/105065 Early Access Discount Price Get in quick! ISmart give you the power to create very easy SMART CAR!! With the top drop-down menu, providing options for create a vehicles with multiple axle types and behaviors like :Sport , Normal,Truck and custom. The project also includes a range of simple example vehicles form Vehicle Tools asset and new Smart Waypoint script! Work with Mobile and Unity 2017.XX The first video is a Tutorial and have PDF tutorial on the asset.
  7. Hey guys! So , my studio (Aligned Games) has finally released its second mobile game , Pocket Rockets Traffic Racer Dash on the Play Store for android devices! The game is a traffic racer game but instead of dodging the cars you are encouraged to smash into them! You use your money earned from playing to buy new vehicles and upgrades. Please give the game a try if you have an android device and let me know what your thoughts are. Enjoy the game and please leave a comment and rating on the Play Store page if you enjoyed it! Download Here
  8. Hello, do you like to see the snow in my game ? Take a look please ! https://www.youtube.com/watch?v=1UUrq4viUuA
  9. Hi, Please checkout my latest video from my car racing game ! Also, like or subscribe will help me alot ! Tell me please, what do you think about my game ! Take a look please !
  10. Strange bugs with the car from the OMA's 2 FPS Kit 1.2 ! In General, I have 2 strange bug that I can't fix it! When I get in the car, sometimes the car begins to fly and turn somersaults in the air! Don't even know what it is =(. the second bug is that when I got in the car it is possible to observe a shift of the machine to the side (she slides sideways slowly) How to fix it? I have disabled the scripts on the wheels, then no slip car. Waiting for help! Thanks in advance!
  11. Hello Guys, Iam a developer in Unity3D. Iam developing a car racing game. There will be the the of this game soon. Link to my Youtube videos: https://www.youtube.com/playlist?list=PL5f0H3dHKn9eTeaMcYLZZju_vgvFThHsR
  12. Hello, I have got a problem. When i tune buggy's(From OMA's Fps kit) torque, gear ratios, power... and build the game, my buggy is slower in different resolutions. Can anybody help me ? Sorry for my English...
  13. HigorKlein

    drive system

    Vehicle system controller fps kit with the soldier's vision. download demo
  14. Hello guys..I have this problem When the player is driving the vehicle and he is attacked by an enemy everything works fine. The player dies and the "spawn" menu appears . But when the player is spawned again, the vehicle controller is still enabled. This only happens when the player dies driving the car. I've tried everything but I can't fix it. I think that it can be solved with something like: if player is dead then vehicle control = disabled. But I can't find how the player receives damage while he is inside the car. Any ideas? Thanks Ps: please don't ask me to show the scripts and that kind of stuff.. I have no problem with it, but I don't have a WiFi connection right now so I'm posting this with my smartphone
  15. Hello guys i just found this car project. It has Realistic suspension ,but it doesn't have engine sound. Its not made by its made by Quill18. Download:http://quill18.com/unity_tutorials/Race%20Test.zip His YouTube channel:https://www.youtube.com/user/quill18creates
  16. Societatem is Singleplayer & Multiplayer tactical FPS. It features infantry combat with a class system, vehicle combat which currently includes jeeps, tanks and helicopters, and specialized game modes such as Takeover and TDM. The infantry features advanced movement such as parkour which includes flipping and climbing over obstacles, leaning around walls and rolling in and out of cover. There are bots in the game and many unlockables you can acquire by earning experience while playing. Current team members: William - Lead programmer, animator Chris (LuxuriousSociety) - Lead modeler, texturer, co-programmer Joltation - Orchestrator The open alpha for Societatem will start at the time of the IGoAUC 2014 competition, which is 25th of December, 2014. More information about the game can be found on our IndieDB page and YouTube channel. We post update videos on YouTube and news on IndieDB. Keep in mind that the latest information on both sites are most likely outdated and differ greatly from what is actually implemented in the game. To save myself the time of doing everything twice, once on here, once on IndieDB, please "watch" our game on IndieDB if interested! IndieDB YouTube Channel Thanks for reading, - William, RedCrusaderGames
  17. Hi! I have a question to apply a "stop" to this script .. to tighten ("shiftUp" button) I want the audio stops for a while (in this case the value of ShiftTime) if time is greater than 0, the audio stops .. if time is less than or equal to 0, the audio plays another look... Here I give you the script in c # : using UnityEngine; using System.Collections; public class prueba : MonoBehaviour { public AudioClip test; public float testvolumenMax = 1; public float testpitch = 1; public float ShiftTime = 0.8f; AudioSource testSource; Drivetrain drivetrain; float volumeFactor; int i,k; AudioSource CreateAudioSource(AudioClip clip, bool loop, bool playImmediately, Vector3 position) { GameObject go = new GameObject("audio"); go.transform.parent = transform; go.transform.localPosition = position; go.transform.localRotation = Quaternion.identity; go.AddComponent(typeof(AudioSource)); go.audio.clip = clip; go.audio.playOnAwake = false; if (loop==true){ go.audio.volume = 0; go.audio.loop = true; } else go.audio.loop = false; if (playImmediately) go.audio.Play(); return go.audio; } void Start () { drivetrain=GetComponent<Drivetrain>(); testSource = CreateAudioSource(test, true, true,Vector3.zero); } void Update () { if(Input.GetButton ("Throttle")){ if(this.drivetrain.rpm>100){ {if (!testSource.isPlaying) testSource.Play();} float factor=drivetrain.rpm/drivetrain.maxRPM; testSource.volume = 0 + testvolumenMax*factor; testSource.pitch = 0.1f + testpitch*factor +0.3f; } } else { float factor=drivetrain.rpm/drivetrain.maxRPM; testSource.volume = 0.1f + testvolumenMax*factor-0.1f; testSource.pitch = 0.1f + testpitch*factor -0.15f; } } } ------------------ how I can apply a stop time to audio? help me? Thanks!
  18. Hi guys! Today I update my car project (using Unity Car). This is the update: Please tell me what do you think. Thanks
  19. Hello friends, I have a question, there any way to create a car and a helicopter in FPS Kit with first person camera (like vehicles in Battlefield 3 and 4)? Thanks, and sorry for my english.
  20. WzL

    Vehicles and stability

    Hi, What is good way to create steering / driving assist (stability) control to car? Our current game idea will include various choices for that and I have already created two, one for steering and one for stability. Steering just lowers steering max angle when speed goes up and stability control brakes on selected wheel when z-axis changes enough. My goal is not to create realistic driving simulation, goal is to make fun game where player can play with physics. So, any good ideas, anyone?
  21. Hello Everyone. Most of us have a dream to buy a cool car. Here is one which i like the most. I'll be buying it after getting a job. Comment yours also. MAHINDRA XUV 500 http://economydecoded.com/wp-content/uploads/2013/03/Mahindra-XUV-500-for-Australia_13.jpe
  22. how to enable and disable scripts with another script? (c#) script: using UnityEngine; using System.Collections; public class nitro : MonoBehaviour { public Component N20; public Component Setup; void Start(){ N20 = GetComponent<N20>(); Setup = GetComponent<Setup>(); } void Update(){ if(Input.GetButtonDown("nitro")){ N20.enable = true; Setup.enable = false; } else { if(Input.GetButtonUp("nitro")){ N20.enable = false; Setup.enable = true; } } } } Message error on unity: nitro.cs(16,9): error CS1061: Type `UnityEngine.Component' does not contain a definition for `enable' and no extension method `enable' of type `UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?) help me please!
  23. hello all .. some time ago, I needed someone to help me and only one person concentrated on helping .. the idea of ​​the script, was to create a professional sound engine, with 4 beeps .. (Idle, low, med, high) and to see that the rpm will increase, the sounds are activated and disabling above .. eg == 1000 -> 1000 = low = play sound == 3000 -> 3000 = med = play sound and stop low etc. .. I think the idea .. but not how to do it properly, and not that long ago I started with this .. script (CS) = using UnityEngine; public class SoundEngine : MonoBehaviour { bool debug=false; public AudioClip Idle; public float IdleVolume=0.35f; public float IdlePitchFactor=1f; public AudioClip engineLow; public float engineLowVolume=0.35f; public float engineLowPitchFactor=1f; public AudioClip engineMed; public float engineMedVolume=0.35f; public float engineMedPitchFactor=1f; public AudioClip engineMax; public float engineMaxVolume=0.35f; public float engineMaxPitchFactor=1f; public AudioClip engineNoLow; public float engineNoLowVolume=0.35f; public float engineNoLowPitchFactor=1f; public AudioClip engineNoMed; public float engineNoMedVolume=0.35f; public float engineNoTMedPitchFactor=1f; public AudioClip engineNoHigh; public float engineNoHighVolume=0.35f; public float engineNoHighPitchFactor=1f; AudioSource IdleSource; AudioSource engineLowSource; AudioSource engineMedSource; AudioSource engineHighSource; AudioSource engineNoLowSource; AudioSource engineNoMedSource; AudioSource engineNoHighSource; private Drivetrain drivetrain; float volumeFactor; int i,k; public void SetDebug(bool db){ debug=db; } AudioSource CreateAudioSource (AudioClip clip, bool loop, bool playImmediately, Vector3 position) { GameObject go = new GameObject("audio"); go.transform.parent = transform; go.transform.localPosition = position; go.transform.localRotation = Quaternion.identity; go.AddComponent(typeof(AudioSource)); go.audio.clip = clip; go.audio.playOnAwake = false; if (loop==true){ go.audio.volume = 0; go.audio.loop = true; } else go.audio.loop = false; if (playImmediately) go.audio.Play(); return go.audio; } public void EngineLow() { if ((this.drivetrain.rpm == 1000f) || (this.drivetrain.rpm > 1000f)) { this.EngineLowSource.audioSource = AudioSource.EngineLow; this.EngineLowSource.audioSource = this.EngineLow; Vector3 enginePositionV=Vector3.zero; engineLowSource = CreateAudioSource(engineLow, true, true,enginePositionV); } else { this.EngineNoLowSource.audioSource = AudioSource.EngineNoLow; this.EngineNoLowSource.audioSource = this.EngineNoLow; Vector3 enginePositionV=Vector3.zero; engineNoLowSource = CreateAudioSource(engineNoLow, true, true,enginePositionV); } if (this.drivetrain.rpm > 2000f) { this.EngineLowSource.audioSource = AudioSource.EngineLow; this.EngineLowSource.audioSource = this.EngineLow; } else { this.EngineNoLowSource.audioSource = AudioSource.EngineNoLow; this.EngineNoLowSource.audioSource = this.EngineNoLow; } if (this.drivetrain.rpm > 3000f) { this.EngineLowSource.audioSource = AudioSource.EngineLow; this.EngineLowSource.audioSource = this.EngineLow; this.EngineMedSource.audioSource = AudioSource.EngineMed; this.EngineMedSource.audioSource = this.EngineMed; Vector3 enginePositionV=Vector3.zero; engineMedSource = CreateAudioSource(engineMed, true, true,enginePositionV); } else { this.EngineNoLowSource.audioSource = AudioSource.EngineNoLow; this.EngineNoLowSource.audioSource = this.EngineNoLow; this.EngineNoMedSource.audioSource = AudioSource.EngineNoMed; this.EngineNoMedSource.audioSource = this.EngineNoMed; Vector3 enginePositionV=Vector3.zero; engineNoMedSource = CreateAudioSource(engineNoMed, true, true,enginePositionV); } if (this.drivetrain.rpm > 4000f) { this.EngineMedSource.audioSource = AudioSource.EngineMed; this.EngineMedSource.audioSource = this.EngineMed; } else { this.EngineNoMedSource.audioSource = AudioSource.EngineNoMed; this.EngineNoMedSource.audioSource = this.EngineNoMed; } if (this.drivetrain.rpm > 6000f) { this.EngineMedSource.audioSource = AudioSource.EngineMed; this.EngineMedSource.audioSource = this.EngineMed; } else { this.EngineNoMedSource.audioSource = AudioSource.EngineNoMed; this.EngineNoMedSource.audioSource = this.EngineNoMed; } if (this.drivetrain.rpm > 7000f) { this.EngineMedSource.audioSource = AudioSource.EngineMed; this.EngineMedSource.audioSource = this.EngineMed; this.EngineHighSource.audioSource = AudioSource.EngineHigh; this.EngineHighSource.audioSource = this.EngineHigh; Vector3 enginePositionV=Vector3.zero; engineMedSource = CreateAudioSource(engineMed, true, true,enginePositionV); } else { this.EngineNoMedSource.audioSource = AudioSource.EngineNoMed; this.EngineNoMedSource.audioSource = this.EngineNoMed; this.EngineNoHighSource.audioSource = AudioSource.EngineNoHigh; this.EngineNoHighSource.audioSource = this.EngineNoHigh; Vector3 enginePositionV=Vector3.zero; engineNoMedSource = CreateAudioSource(engineNoMed, true, true,enginePositionV); } if (this.drivetrain.rpm > 8000f) { this.EngineHighSource.audioSource = AudioSource.EngineHigh; this.EngineHighSource.audioSource = this.EngineHigh; } else { this.EngineNoHighSource.audioSource = AudioSource.EngineNoHigh; this.EngineNoHighSource.audioSource = this.EngineNoHigh; } if (this.drivetrain.rpm > 8900f) { this.EngineHighSource.audioSource = AudioSource.EngineHigh; this.EngineHighSource.audioSource = this.EngineHigh; } else { this.EngineNoHighSource.audioSource = AudioSource.EngineNoHigh; this.EngineNoHighSource.audioSource = this.EngineNoHigh; } if (this.drivetrain.rpm > 9000f) { this.EngineHighSource.audioSource = AudioSource.EngineHigh; this.EngineHighSource.audioSource = this.EngineHigh; } else { this.EngineNoHighSource.audioSource = AudioSource.EngineNoHigh; this.EngineNoHighSource.audioSource = this.EngineNoHigh; } } public void rpmVal() { this.rpmOnValue = Mathf.Clamp(this.drivetrain.rpm, this.drivetrain.minRPM, this.drivetrain.maxRPM) / 10000f; } private void Start() { drivetrain= GetComponent<Drivetrain>(); this.backgroundMat.color = this.backgroundColor; this.IdleSource.audioClip = AudioClip.EngineLow; this.EngineLowSource.audioClip = AudioClip.EngineLow; this.EngineLowSource.audioClip = AudioClip.EngineLow; this.EngineLowSource.audioClip = AudioClip.EngineLow; this.EngineMedSource.audioClip = AudioClip.EngineMed; this.EngineMedSource.audioClip = AudioClip.EngineMed; this.EngineMedSource.audioClip = AudioClip.EngineMed; this.EngineHighSource.audioClip = AudioClip.EngineHigh; this.EngineHighSource.audioClip = AudioClip.EngineHigh; } void FixedUpdate(){ if (drivetrain){ float factor=drivetrain.rpm/drivetrain.maxRPM; engineNoLoweSource.volume = Mathf.Clamp01((1 - drivetrain.throttle)*engineNoLowVolume*factor); engineNoLowSource.pitch = 0.5f + engineNoLowPitchFactor*factor; engineLowSource.volume = Mathf.Clamp01(drivetrain.throttle*engineLowVolume*factor + engineLowVolume*0.3f*factor); engineLowSource.pitch = 0.5f + engineLowPitchFactor*factor; engineNoMedSource.volume = Mathf.Clamp01((1 - drivetrain.throttle)*engineNoMedVolume*factor); engineNoMedSource.pitch = 0.5f + engineNoMedPitchFactor*factor; engineMedSource.volume = Mathf.Clamp01(drivetrain.throttle*engineMedVolume*factor + engineMedVolume*0.6f*factor); engineMedSource.pitch = 0.5f + engineMedPitchFactor*factor; engineNoHighSource.volume = Mathf.Clamp01((1 - drivetrain.throttle)*engineNoHighVolume*factor); engineNoHighSource.pitch = 0.5f + engineNoThrottlePitchFactor*factor; engineHighSource.volume = Mathf.Clamp01(drivetrain.throttle*engineHighVolume*factor + engineHighVolume*0.9f*factor); engineHighSource.pitch = 0.5f + engineHighPitchFactor*factor; } } } ------------------------------------------------------------------ please help me, and I will be grateful for life!
  24. Could somebody pleaassee follow this and give me the script (playercar.js)?. I've tried following this at least 3 times and each time I get different errors in Unity 4.2.2. D: I would give some of the errors, but I'm on vacation and don't have my desktop computer. I went through the first tutorial for his normal car game and got no errors. SO yes, Please Help! Here's the tutorial:
×
×
  • Create New...