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.

Newbie

23

## Community Reputation

0 Neutral

• Rank
Newbie
• Birthday 08/12/1987

• Location:
Pakistan

4. ## car movement with accelrometer

I m working on a car racing game for android and getting problem with the left and right movement of the car with accelrometer..movement is not smooth..anyone can help me.Complete update function code is given below....plz do help me... function Update () { var dir : Vector3 = Vector3.zero; // This is to limith the maximum speed of the car, adjusting the drag probably isn't the best way of doing it, // but it's easy, and it doesn't interfere with the physics processing. rigidbody.drag = rigidbody.velocity.magnitude / 250; // 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] ; FrontRightWheel.motorTorque = EngineTorque / GearRatio[CurrentGear] ; // the steer angle is an arbitrary value multiplied by the user input. FrontLeftWheel.steerAngle = 10 * Input.GetAxis("Horizontal"); FrontRightWheel.steerAngle = 10 * Input.GetAxis("Horizontal"); dir.x = -Input.acceleration.y; dir.z = Input.acceleration.x; if (dir.sqrMagnitude > 1) dir.Normalize(); // // Make it move 10 meters per second instead of 10 meters per frame... dir *= Time.deltaTime; // Move object transform.Translate (dir * 10); }
5. ## Puzzle game

fittay muu.....
6. ## Endless Running Game Speed + Movement Scripts

Make Box collider atatched with an empty object after every 10 miles and check onTrigger. then in onTriggerEnter function make wat u want..suppose when the player passes through first collider there is a function in script attatched with collider object which checks if the player passes increase the speed wat u want and similarly apply for ur next collider...hope u got it..
7. ## Puzzle game

I want to make a puzzle game..how can i create this one..from where i can found interesting puzzles game algoritham which make the games more addictive...??
8. ## PowerUp GUI

I used to see unity documentation but did not get it...
9. ## PowerUp GUI

this is where i am currently messed up - I have to make a power-up GUI in the game like in in temple run read this is what i wanna do - when i open a scene i see the button called settings, i click on it and a screen opens and i can tap on the powerup tap button to buy it [once tapped it changes color forever as i have purchased it and other 3 parts of the bar are disable till Enable button 1 to buy when - coinVal=500, Enable button 2 to buy when - coinVal=1500, Enable button 3 to buy when -coinVal=2500] like this http://cdn.appstorm.net/ipad.appstorm.n ... -Perks.png please help me...
10. ## Car did't stays on terrain

how can i load screen shot here...
11. ## Car did't stays on terrain

yes i applied wheel collider class...
12. ## Car did't stays on terrain

I create a terrain which has a terrain collider.when i placed a car which has all 4 wheel colliders at the terrain, it passes through the terrain..how can my car stays on the terrain and run??
13. ## need help in making 2d racing game in 3d envoirment

hey daer i tried alot but could not solve my problem..Plz give me any script for an endless racing track. I shall be v thankful 2 u...