Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 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 YagoTheFrood · Jan 12, 2014 at 10:37 PM · functionlerpreturncontext

"Unknown resolve error"

I wanted to write my own Lerp function because the one came with Unity is behaving weirdly. So I wrote this:

 void Update()
     {
         rigidbody.velocity = PlayerVelocity(rigidbody.velocity, playerRunSpeed);
     }
     
 Vector3 PlayerVelocity(Vector3 subjectV, Vector3 targetV)//on this line
     {
         return (((targetV - subjectV) / 2) + subjectV);
     }

...But when I hover over the "subjectV" or "targetV" on the line I marked with the cursor, the tooltip reads "Unknown resolve error". When I hover over the ones IN the function, it reads "The name 'targetV' does not exist in the current context". How come? It's a very simple function, but I seem to be missing something..?

Comment
Add comment · Show 4
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 getyour411 · Jan 12, 2014 at 10:40 PM 0
Share

Are you passing playerRunSpeed (presumambly a float/int) into Vector3 targetV?

avatar image YagoTheFrood · Jan 12, 2014 at 10:46 PM 0
Share

playerRunSpeed is also a Vector3.

avatar image getyour411 · Jan 12, 2014 at 10:51 PM 0
Share

Does your code work if you ((temp/for debugging) remove the fuction and change it to:

rigidbody.velocity = (playerRunSpeed - rigidbody.velocity) / 2 + rigidbody.velocity;

Also there are some rules for Vector3 that need the 'new' keyword, I haven't returned a Vector3 in a function but you might need to use the 'new' keyword.

avatar image Eric5h5 · Jan 12, 2014 at 11:01 PM 0
Share

The Lerp in Unity doesn't behave weirdly; it's just (b - a) * t + a.

2 Replies

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

Answer by YagoTheFrood · Jan 12, 2014 at 11:17 PM

I solved the problem. As Erich5h5 predicted, it wasn't Lerp's fault, the anomaly was being caused by rigidbody.velocity. The ACTUAL anomaly was that rigidbody.velocity would be set to a constant value of (0, 0, 5) instead of tweening towards (0, 0, 100). The problem was fixed when I didn't use rigidbody.velocity at all, and incremented rigidbody.position with a velocity I declared myself and Lerp'ed.

I still don't know what the "Unknown resolve error" tooltip was about, but I noticed it pops up when I hover over a lot of other stuff as well, not just subjectV and targetV. I'm assuming it's a bug in Monodevelop.

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 elenzil · Oct 21, 2016 at 06:58 PM

posting here for future folks who may search for the same "Unknown Resolve Error".

i got this error in the pop-up when i hovered over a method i had just recently added documentation to. quitting Mono and restarting cleared it up.

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

20 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

C# Return Type Error? 1 Answer

function that will return the name of the data type of a variable? 2 Answers

Breaking out of a function from an if statement inside..... Noob 1 Answer

Where can a Lerp be used? 2 Answers

Error c#, using return with variable 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