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
0
Question by Dimwood2011 · Oct 21, 2012 at 03:09 PM · resetrotaion

how can i make pinball flippers work correctly?

i can get flippers to rotate correctly.i would like the left flipper to spin like 90 degrees stop then go back to origin after i Getkey.up. this problem has been about 1 month now. i wanted to figure it out on my own ,but im not getting anywhere.the flipper is made in blender.should i animate it there for the rotaion im asking about , or do it by script in unity?thanks Dimwood

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 Loius · Oct 21, 2012 at 04:09 PM 1
Share

You should really provide answers as answers so those of us who go through unanswered questions don't have nothing to do :P

avatar image Dimwood2011 · Oct 22, 2012 at 01:11 AM 0
Share

this script just seems to make it spin in a big orbit.it does rotate but it rotates in a big circle and it just keeps spinning?what am i missing?its like the pivotpoint is a really far away

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by LeakySink · Oct 21, 2012 at 10:21 PM

You could create a parent object to use as a pivot and then use the flipper as a child. Then rotate the parent to achieve the effect you're after.

Comment
Add comment · Show 4 · 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 Dimwood2011 · Oct 22, 2012 at 01:38 AM 0
Share

i added an empty, that helped with the rotation at the correct point.now how to stop the rotation and have it flip back to the origin? thanks im noob

avatar image Dimwood2011 · Oct 22, 2012 at 02:01 AM 0
Share

var $$anonymous$$yRotation : float = 0; function Update() { if(Input.Get$$anonymous$$ey("a")) transform.Rotate(0,-10, 0);

 if(Input.Get$$anonymous$$eyUp("a"))
 transform.rotation = Quaternion.identity;
 
 
 

}

avatar image Fattie · Oct 22, 2012 at 06:06 AM 0
Share

it's definitely an EXCELLENT IDEA to use a "marker" .. an empty object ... as a parent to get a ,more useful origin, etc. Great work @Leaky

BUT be sure to familiarise yourself with this amazing command,

http://docs.unity3d.com/Documentation/ScriptReference/Transform.RotateAround.html

you essentially can't make games without it - it's critical. cheers!

avatar image Dimwood2011 · Oct 23, 2012 at 02:19 AM 0
Share

thanks fattie

avatar image
0

Answer by tddaniels · Mar 28, 2013 at 11:18 AM

I was having the same issue - came across this tutorial on youtube.

http://www.youtube.com/watch?v=Yaxb1LhRQ_U

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

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Problem naming instances with incrementally numbered counter 1 Answer

Help With Simple Rotation 4 Answers

Programming A Reset Scene 0 Answers

this script is to reset the ball to its initial position after every kick in foorball game.. 1 Answer

Vertex World Rotation? 4 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