• 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 Elson · Aug 10, 2014 at 01:50 PM · normalwall jump

what is wallJumpContactNormal.y ?

I know that the normal indicates where an object surface is facing,

 if(Mathf.Abs(wallJumpContactNormal.y) < 0.2f)
     
         wallJumpContactNormal.y = 0;
 ///=====================================================================
  Help me if Im getting this above part wrong... I read it as...
  Ignore the height of the normal which is 20% above or below
 //======================================================================



 if(Mathf.Abs(wallJumpContactNormal.y) < 0.2f)
     {
         wallJumpContactNormal.y = 0;
         moveDirection = wallJumpContactNormal.normalized;
         //Wall jump gives at least trotspeed
         moveSpeed = Mathf.Clamp(moveSpeed * 1.5f, trotSpeed, runSpeed);
     }
     else
     {
         moveSpeed = 0;
     }
Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by robertbu · Aug 10, 2014 at 01:53 PM

I would read this as: if the surface hit is modestly tilted up, or an any way tilted down, treat the surface as if it was straight up and down (not tilted).

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 Elson · Aug 12, 2014 at 07:58 PM

I got your point:

That way, straight up would be 0 and up to 20% tiltness(inclination) unity'd consider as straight up anyways and the player'd receive a force to jump out of the wall 105%, not less then trotSpedd and no more than runSpeed. Otherwise if the inclination is greater or less then this value(20%) it wouldn't receive no speed at all.

Is that what you mean?

At first I thought that the heith of the wall was the thing that'd trigger the player speed and direction setting. It'd only be active beyond 20% but that in fact would be inefficient if we'd jump from one wall to another cuz its height'd go over this amount.

I have just one more question...

''wallJumpContactNormal.y'' is comparing y(height) value to another value...(if it goes over/below 20%) if straight Up is zero... is positive 1 at -x?

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

exact vector reflection along collision normal vector 1 Answer

Not detecting a simple collision? 2 Answers

Collisions, Getting the Normal of the Collision Surface (Not the Angle of Impact) 1 Answer

Do we need to call RecalculateNormals() if normal vectors are assigned? 1 Answer

empty object with player controller attached isnt detecting collisions 2 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