Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 benk0913 · Oct 10, 2012 at 10:56 AM · rotationtransformquaternionlookatslerp

Get slerp to work just as LookAt(,Vector3.right) does

Ive got my sidescroller shooter character to turn with these :

chest.LookAt(mousepos,Vector3.right);

&

chest.LookAt(mousepos,Vector3.left);

so it wont aim in to any other axis... But when the mouse gets to cross the middle of the character and not around it it gets the rotation to make a small transportation between frames and it wont get all the way to there.. It'll just teleport to its correct rotation like lookat should.

Well the question is, how do I get any quaternion slerp which works with a Time.deltTime to work as same as LookAt(,Vector3.right)? I must have the Vector3.right and left so it'll move trough 1 axis.

Many thanks to anyone who helps me out. :)

Comment
Add comment · Show 3
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 Fattie · Oct 10, 2012 at 11:15 AM 0
Share

that is a remarkable use of LookAt ! I'm for one too dense to see that, you'd have to post a screen shot

there are many questions on here about lerp, slerp, LookAt

http://answers.unity3d.com/questions/26113/error-with-rotating-script.html

I$$anonymous$$PORTANT TIP:

this web site is broken (the time for being polite seems to be in the past :-/ )

the search function basically doesn't work, it just seems to log-you-out of the new log-you-in system and not do much else

so very simply search on google, it works beautifully

as the first search term, use "answers.unity3d.com"

so for this problem enter with spaces ...

"answers.unity3d.com slerp LookAt"

or perhaps lerp rather than slerp, and you will find many answers probably what you want. Hope it helps

avatar image benk0913 · Oct 10, 2012 at 11:36 AM 0
Share

Well, if theres anyone which knows an answer already.. then he will prevent me alot of work over searching.

avatar image Sisso · Oct 10, 2012 at 12:04 PM 1
Share

Always search before. Duplicate a question is bad. Take time from everybody that was trying to help answers, and each time, got worse responses. If the amount of users here were the size of stackoverflow, this would not be a problem.

1 Reply

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

Answer by benk0913 · Jan 30, 2013 at 01:18 PM

I have used a vector2 and made it to switch directions when the mouse crosses the middle. :)

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

12 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

Related Questions

How to get Angle float of specific axis.(Turret clamping related). 2 Answers

Look at rotation at a moving object while moving (C#)(2D) 3 Answers

How to clamp the rotation of this? 0 Answers

Add 90 Degrees to Transform.Rotation 2 Answers

Have An Object Rotate Around Transform A So That Transform B is Looking at Transform C (C#) 0 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