- Home /
How to tilt my bus when it turns?
I am new to unity. I am doing a bus parking game where my bus move and turn well .But I want it to tilt a little whenever it turns left or right. I am just stuck in this problem and I am really in a soup. Please help me out.
Thank u for your precious suggestion. $$anonymous$$y bus now tilts when it turns but it is shaking at the time of turning.
Answer by brycem24 · Aug 26, 2014 at 05:11 PM
I cannot give you a detailed response as you do not have your code here. But I would have it so when the bus is turning you use transform.Rotate to move it on the Y axis to have the appearance of it tilting.
Answer by arain55 · Aug 26, 2014 at 05:29 PM
You could look at the sample assets in the assets store
Answer by Tawakal125 · Dec 30, 2019 at 11:05 AM
//use this code to move your bus to left and right
var movement = new Vector3(Input.acceleration.normalized.x, 0.0f, 0.0f);
rb.velocity = movement * speed;
Your answer
Follow this Question
Related Questions
Motorcycle/Bike Physics Trouble 5 Answers
iOS Tilt input and constant force 0 Answers
Making script only effect one gameobject when attached to multiple 2 Answers