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.

arwe2793

Member
  • Content Count

    244
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by arwe2793

  1. oh btw, with upcoming cristmas :-D
  2. hi, i need temproary solution. i searching nitro oxide sound effect like need for speed most wanted or carbon hawe, may someone know wheres to find one for temproary use until i will get my own one?
  3. oh i will try this to, i allready made working nitro with nfs carbon style bar whitch automaticly slowly refils, but onliy problem ir when getkeyup should work, its not working, atleast when i make turn its actiwates. in other words, let say i hold w then pres left shif and nitrous enabled, i driwe a track until i release shift, and nitrous stil worning, but if i make extra turn or release w, its get disabled. i dont understand what i did wrong, as i sayd getkeyup not working properly.
  4. no i already tried, when i pres shift it just play particle a second and disapear
  5. hello is it posible to control atributes of one wheel collider in scene from other script. i hawe a car with 4 colliders in example, and just 2 of them want to edit when space bar pressed if (input.getkeydown(keycode.space) { wheel collider atributes... } thank you
  6. and i allso noticed just now that i only need to press shift for nitro, i cant use if (Input.GetKeyDown(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.W)) couse its count when both buttons are pressed at same frame, so i add ! front of the second input, but that didnt hellp my as i see now
  7. hi, i on my own fun making free racing kit... and have few problems... first a nitro effet which is working pretty well var lnitro : GameObject; var rnitro : GameObject; function Start() { } function Update () { if (Input.GetKeyDown(KeyCode.LeftShift) && !Input.GetKeyDown(KeyCode.W)) { lnitro.renderer.enabled = true; rnitro.renderer.enabled = true; } else if (Input.GetKeyUp(KeyCode.LeftShift) || Input.GetKeyUp(KeyCode.W)) { lnitro.renderer.enabled = false; rnitro.renderer.enabled = false; } } (i still learning programing, just keep in mind) so in this code problem is that the nitro never stops, i need that when you hold shift for let say 5 secons its usdenky stops and 10 secons you cant use it, well atleast something similar to need for speed, may someone have sugestions. another problem is speedometer, i use 2 spedoometers, one is digital and other needle, how can i set layres that digital (gui text) go on speedometer ciferblat ( GUI texture)
  8. hello, i found this www.cowfacegames.com/articles/improvised-occlusion-culling-in-any-version-of-unity-via-dynamic-frustum-far-plane-shifting i not sure is it working and or u need to buy it, but there are one script, bad that i can test it right noy, so if someone anyway need it for unity free and will test it pls reply is it working or not thank you
  9. i allready followed a lot of tutorials, for this car scripts to, but thanks
  10. i fond a topic about polys for gun and get interested how much polygons i could use for buildings for pc game i making real town of my hometown atmosphere and everything seems wery, wery similar to my town, distances and buildings and all... collors and textiures is temroary, game laggy on my old pc but as u can see while playing on frnd pc is good, all buildings have around 5k to 13k polygons. so how much polygons should i make for if in photo u can see my town, buildings and etc, red line markjs theritory of what i planing to do. i know i can do it, i allready did a lot, but want to know how much buildings can have polys for such game, i making allso alot of trees from defoult unity trees. another quastion is for android, if i woul;d want to make free roam fro racing game just like nfs mw 2005 is, how polys could have polys? now i just using 4 planes with textures for buildings, but wanna make some more detailed but scare to make to heavy. sory for bad englis, its not my native language
  11. and allso, gear thingy is fucked up on pc, its starts drom gear 1 and when i reach some speed its shift to 5, so skip 2.3 and 4, gers shift ratio is ok i ges, i got it with a script, but its optional, i need to fix android controlls.
  12. hi, i have 2 scripts of car, one is for pc gameplay and workink pretty well, another is same just changed something that should make game run on android devices. i will post both of them here, they free ofc. pc version is working but android one not, i build game for android and cant make the car drive, on pc build everything is ok except that car allways turn to left a little. I used gui texture as buttons for left right turns and stop and go, allso car have 4 wheel colliders. can someone hellp my to fix it cuz i not sure what is wrong with android one, no compile errors. or may someone have simillar script with multitouch capability and 4 wheels coliders... android script: #pragma strict var FrontLeftWheel : WheelCollider; var FrontRightWheel : WheelCollider; var BackLeftWheel : WheelCollider; var BackRightWheel : WheelCollider; var gasButton : GUITexture; var breakButton : GUITexture; var leftTurnButton : GUITexture; var rightTurnButton : GUITexture; var motorInputTouch : int = 0; var breakPower : float = 200; var GearRatio : float[]; var CurrentGear : int = 0; static var gravity: Vector3; var EngineTorque : float = 230.0; var MaxEngineRPM : float = 3000.0; var MinEngineRPM : float = 1000.0; private var EngineRPM : float = 0.0; function Awake() { gasButton = GameObject.Find("Gas_Pedal").guiTexture; breakButton = GameObject.Find("brake_Pedal").guiTexture; leftTurnButton = GameObject.Find("Left_Turn_Button").guiTexture; rightTurnButton = GameObject.Find("Right_Turn_Button").guiTexture; } function start() { rigidbody.centerOfMass += Vector3(0, -1, .25); Physics.gravity = Vector3(0, -20.0, 0); } function update() { for (var touch : Touch in Input.touches) { if (touch.phase == TouchPhase.Stationary && gasButton.HitTest (touch.position)){ motorInputTouch = 1; } else if (touch.phase == TouchPhase.Ended && gasButton.HitTest){ motorInputTouch = 0; } if (touch.phase == TouchPhase.Stationary && breakButton.HitTest (touch.position)){ breakPower = 200; } else if (touch.phase == TouchPhase.Ended && breakButton.HitTest){ breakPower = 0; } if (touch.phase == TouchPhase.Stationary && leftTurnButton.HitTest (touch.position)){ FrontLeftWheel.steerAngle = -15; FrontRightWheel.steerAngle = -15; } else if (touch.phase == TouchPhase.Ended && leftTurnButton.HitTest){ FrontLeftWheel.steerAngle = 0; FrontRightWheel.steerAngle = 0; } if (touch.phase == TouchPhase.Stationary && rightTurnButton.HitTest (touch.position)){ FrontLeftWheel.steerAngle = 15; FrontRightWheel.steerAngle = 15; } else if (touch.phase == TouchPhase.Ended && rightTurnButton.HitTest){ FrontLeftWheel.steerAngle = 0; FrontRightWheel.steerAngle = 0; } EngineRPM = (FrontLeftWheel.rpm + FrontRightWheel.rpm)/2 * GearRatio[CurrentGear]; ShiftGears(); audio.pitch = Mathf.Abs(EngineRPM / MaxEngineRPM + 1.0); if (audio.pitch > 2.0) { audio.pitch = 2.0; } FrontLeftWheel.motorTorque = EngineTorque / GearRatio[CurrentGear] * motorInputTouch; FrontRightWheel.motorTorque = EngineTorque / GearRatio[CurrentGear] * motorInputTouch; //FrontLeftWheel.steerAngle = 10 * Input.GetAxis("Horizontal"); //FrontRightWheel.steerAngle = 10 * Input.GetAxis("Horizontal"); } } function ShiftGears() { if ( EngineRPM >= MaxEngineRPM ) { var AppropriateGear : int = CurrentGear; for ( var i = 0; i < GearRatio.length; i++) { if (FrontLeftWheel.rpm * GearRatio[i] < MaxEngineRPM ) { AppropriateGear = i; break; } } CurrentGear = AppropriateGear; } if (EngineRPM <= MinEngineRPM ) { AppropriateGear = CurrentGear; for (var j = GearRatio.Length-1; j >= 0; j--) { if ( FrontLeftWheel.rpm * GearRatio[j] > MinEngineRPM ) { AppropriateGear = j; break; } } CurrentGear = AppropriateGear; } } and pc one : // These variables allow the script to power the wheels of the car. var FrontLeftWheel : WheelCollider; var FrontRightWheel : WheelCollider; static var gravity: Vector3; // These variables are for the gears, the array is the list of ratios. The script // uses the defined gear ratios to determine how much torque to apply to the wheels. var GearRatio : float[]; var CurrentGear : int = 0; // These variables are just for applying torque to the wheels and shifting gears. // using the defined Max and Min Engine RPM, the script can determine what gear the // car needs to be in. var EngineTorque : float = 230.0; var MaxEngineRPM : float = 3000.0; var MinEngineRPM : float = 1000.0; private var EngineRPM : float = 0.0; //speedomer var mphNeedle : RotatableGuiItem; //needle var dkphDisplay : GUIText; //digital function Start () { // I usually alter the center of mass to make the car more stable. I'ts less likely to flip this way. rigidbody.centerOfMass += Vector3(0, -1, .25); } function Update () { Physics.gravity = Vector3(0, -20.0, 0); //speedometer //needle var kph = rigidbody.velocity.magnitude * 6.7; mphNeedle.angle = kph; mphNeedle.angle = 20 + kph * 1.4f; //rotation depents on speed //digital var dkph = rigidbody.velocity.magnitude * 9.6; dkphDisplay.text = dkph + " KPH"; //endspeedometer // Compute the engine RPM based on the average RPM of the two wheels, then call the shift gear function EngineRPM = (FrontLeftWheel.rpm + FrontRightWheel.rpm)/2 * GearRatio[CurrentGear]; ShiftGears(); // set the audio pitch to the percentage of RPM to the maximum RPM plus one, this makes the sound play // up to twice it's pitch, where it will suddenly drop when it switches gears. audio.pitch = Mathf.Abs(EngineRPM / MaxEngineRPM) + 1.0 ; // this line is just to ensure that the pitch does not reach a value higher than is desired. if ( audio.pitch > 2.0 ) { audio.pitch = 2.0; } // finally, apply the values to the wheels. The torque applied is divided by the current gear, and // multiplied by the user input variable. FrontLeftWheel.motorTorque = EngineTorque / GearRatio[CurrentGear] * Input.GetAxis("Vertical"); FrontRightWheel.motorTorque = EngineTorque / GearRatio[CurrentGear] * Input.GetAxis("Vertical"); // the steer angle is an arbitrary value multiplied by the user input. FrontLeftWheel.steerAngle = 10 * Input.GetAxis("Horizontal"); FrontRightWheel.steerAngle = 10 * Input.GetAxis("Horizontal"); } function ShiftGears() { // this funciton shifts the gears of the vehcile, it loops through all the gears, checking which will make // the engine RPM fall within the desired range. The gear is then set to this "appropriate" value. if ( EngineRPM >= MaxEngineRPM ) { var AppropriateGear : int = CurrentGear; for ( var i = 0; i < GearRatio.length; i ++ ) { if ( FrontLeftWheel.rpm * GearRatio[i] < MaxEngineRPM ) { AppropriateGear = i; break; } } CurrentGear = AppropriateGear; } if ( EngineRPM <= MinEngineRPM ) { AppropriateGear = CurrentGear; for ( var j = GearRatio.length-1; j >= 0; j -- ) { if ( FrontLeftWheel.rpm * GearRatio[j] > MinEngineRPM ) { AppropriateGear = j; break; } } CurrentGear = AppropriateGear; } } thank you
  13. arwe2793

    is this legit?

    he attack link to download assets in video description, may thats one hellps, if its ok could be shared in this forum
  14. arwe2793

    is this legit?

    i found this video http://www.youtube.com/watch?v=NSWDsyENCTk&list=TL0Y3QVfqYSEby5_dvJ6b6KaSA9gXUx3B0 this guy give these car physic for free and sayd do whatever we like, but i cant be sure that i can use it, if this edys vehistle physics, i dindnt bought it and i cant use it for comercial and noncomercial use, can someone who undferstant all these things check it and say is it legit? sorry for bad english, its not my native language
  15. thanks, i will check it, jus quastion, do i need rig a car?
  16. Oh wery thanks fos camera script )
  17. hi, how u make car amortization, like whole body seems moving diferent than wheels. just like in this video http://www.youtube.com/watch?v=cpQpU4sJCgY, and may someone have script of camrea folow like in need for speed games, coz smooth folow looks litle diferent in some way
  18. i wanna make terrain in unity, then export it to heihtmap and import to blender to redo terrain,(yas from unity to blender, cos then i can delete unneeded parts for performance) do its posible and how to do that. but i need wery detailed heiht map, that when i import in blender it make all hils just how in unity it was, even smallest
  19. hello, I need script that when i click left mouse button somewhere on terrain my player go there, just like in "mu online" style (no path finding needed) . And also when i press once he will just walk, and when i press twice very fast he will run. nu jump needed just walk and run animations... But i don't need the animations, just script plz someone who have good scripting knowledge make this script
  20. hi, yas i add rigitbody. i dont see where i could uncheck play animation automat... the wheels spining not in right direction, ass u see in photo thei backwards, if red arrow would be direction y and green is x, then normaly they should spin in red arow direction, in y, but now they spin in x like wings, or from movie "back to the future " dolorian, and when i pres w to drive its start floating
  21. hello, i trying to add car in to fps kit, but wheels somehow spining when i start the game. i add photo, when i pres unlock mouse or somethink, car drop down as its should be but wheels start spin, the i enter to car and pre "w" and its floatng in air... what i did wrong? if u need more info i sure can give, like error console or something
  22. arwe2793

    car shaders

    hello, i looking for free car shaders which looks like in this vid someone may know such shaders or video tut how to achieva such results. thanks
  23. hello, i need script which detect on obijact collision of another obijact, then enable rigitbody on it, in exaplle i using oma kit and want that when u hit fence with one of all wehistles and helicopter, fence would fall and haw rigibody. same with street light or street signs like in gta. or bazooka well could be list off obj which react with fence ir street light, or any another obj.
×
×
  • Create New...