Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by sanghai · Sep 22, 2011 at 08:05 AM · airplaneyaw

Need help in making my plane to do Yaw

This is what I have wrote to tilt my airplane while going left and right values of variables used in script after trial and error are

(i.e. its doing Rotation but not yaw ...I want to do Yaw also )

public float _y_movement= -1.0f; public float _z_movement=-1.0f; public float _rotateSpeed=0.05f;

Quaternion temp_rotate0 = new Quaternion(0.0f, (Input.GetAxis("Vertical") / 4) _y_movement, (Input.GetAxis("Horizontal") / 4) _z_movement, 1.0f);

transform.rotation = Quaternion.Lerp(transform.rotation, temp_rotate0, Time.deltaTime * _rotateSpeed);

With this My plane is doing tilting to left and right But I want my plane to even face left nd right little bit respectively i.e. I want my plane to do yaw

So what should i add to this to make it doing Yaw ?

Comment
Add comment · Show 1
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 Meltdown · Oct 10, 2011 at 07:58 AM 0
Share

Are you assigning your aircrafts rudder input to do yaw? Input in an aircraft's rudder causes the plane to yaw i.e rotate around its y-axis. Yaw is a rotation essentially.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Silencerx · Sep 22, 2011 at 09:14 AM

woa woa woa, why not just make an animation, when you push left play the tilt left animation.

this method even allows for easy tweaking

if your going to animate please note that you will run into troubles if your animated object is not parented to a null object(dummy box) plus it's alot easier to work with as during an animation the rotation of an object seems to be taken very literal, not allowing for rotational changes unless done on a parent

Comment
Add comment · Show 8 · 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 sanghai · Oct 07, 2011 at 05:44 AM 0
Share

I am not able to animate $$anonymous$$...is there some tutorials where i can see how to this tilt left animation stuff or sort of same...

avatar image Silencerx · Oct 07, 2011 at 06:17 AM 1
Share

well if your using 3ds max it's really easy just set auto key and tilt the plane left and right at the correct key frames, if your using blender or something else i have no idea how to animate in them.

you can animate in unity, i would find a tutorial as i usually animate in max and am novice, but i would imagine

  1. link your plane to a empty game object if not already

  2. at the uper right of the scene/game window there is a tab options button it looks like 3 horizontal lines, click it

  3. add an animation tab

  4. click the red dot at the top of the animation tab to record your actions (it will prompt you to save the animation, do so in your plane dir)

  5. add a keyframe at frame 0(button is to the right of red record button)

  6. more the slider to frame say 10 then

  7. in scene view tilt your plane left how you want

  8. move the slider to say frame 30 and add a keyframe so that the plane holds the tilt for a bit

  9. move the slider to frame 40 and reset the rotations of the plane(should add a keyframe)

  10. you can right click keyframes and choose the options to smooth out the animation

  11. repeat for the tilt right(you may want to copy values that are next to the rotation axis in the animation tab, just slide to the apropriate frame copy and invert the value in the right tilt)

  12. you now have 2 animations on the plane, just refer to the unity script reference site on how to use them

note: i have had problems using unity's animation with it using absolute values and not relative ones, so my object snaps back to where i animated it, i assume parenting the object would alleviate this problem, i have not tested so try at your own risk

avatar image Kacer · Oct 07, 2011 at 08:14 AM 0
Share

does that really work?, last time i tried something similar i couldnt import it because it classified as vertex animation

avatar image Silencerx · Oct 07, 2011 at 02:15 PM 0
Share

yea, i don't even think unity supports vertex animation unless by skinned bones or custom code, atleast from my experiences, I did make a door concept using this similar method and have used unity anim before

avatar image sanghai · Oct 10, 2011 at 05:53 AM 0
Share

Thanks $$anonymous$$ ... Let me try this today ...get back to u soon...

Show more comments

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Problems with scripts 0 Answers

Building system 0 Answers

C# code to Java code 1 Answer

How to toggle a key for a car to go forward or backward? 1 Answer


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