Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
-3
Question by robertmathew · Mar 30, 2011 at 09:53 AM · gameiceskating

ice skatting game

in my ice skating game i want the same effect as real ice skating game.how to get it while character runs through the ice.when the character run when he take a turn to left or right how to make the character to tilt toward one side due to the body mass he having like skating game. in skating game when player runs and turn immediately to left or right direction how to make him slightly tilt the his body towards the side he trued due to the mass of the body as in real ice skating game. how to tilt the character to one side when i use left and right arrow in my game.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Proclyon · Mar 30, 2011 at 10:32 AM 2
Share

I do not understand the question enough to give any answer of which I feel the investment of time I put in it is worth it for the Q&A process. Please rephrase and elaborate

avatar image DaveA · Mar 30, 2011 at 03:53 PM 0
Share

He wants 'auto banking'. Why so many down votes? We've seen broken English and bad spelling before. robermathew: do a search for bank or banking, check into some flight simulators that might do this for planes.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by AngryOldMan · Mar 30, 2011 at 10:20 AM

under the function for making your character turn add a fixed rotation on your local sideways axis. Although you will probably have to parent your character to an empty game object that's at the characters feet (and rotate that instead) to get the "lean" looking right.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by robertmathew · Mar 30, 2011 at 12:55 PM

var player1 : Animation; var smooth = 2.0; var tiltAngle = 30.0; var tiltAngle1 = -30.0; var a1 =0; var a2 = 0;

    function Update () 
                   {

 if(a1==1)
 {
 var tiltAroundZ = Input.GetAxis("Horizontal") * tiltAngle1;
 var target = Quaternion.Euler (0, 0, tiltAroundZ);
 transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * smooth); 
 }

 if(a2 ==1)
 {
 var tiltAroundZ1 = Input.GetAxis("Horizontal") * tiltAngle;
 var target1 = Quaternion.Euler (0, 0, tiltAroundZ);
 transform.rotation = Quaternion.Slerp(transform.rotation, target1, Time.deltaTime * smooth);        
 }






 if(Input.GetAxis("Horizontal")  < -.1 )
 {       
 a1 = 1; 

 }


 if(Input.GetAxis("Horizontal")  < .1 )
 {       
 a2 = 1;

 }


 if(Input.GetKey(KeyCode.UpArrow))
 {

 player1.Play("Take 001");
 transform.Translate(0,0,0.1);   

 }


}

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

getting udp package info inside unity (GlovePIE) 0 Answers

Slider Puzzle Game C# 0 Answers

Android/iPhone Development 1 Answer

display editor script in the game window 0 Answers

Why isn't the text centered in my game screen? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges