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 therobin9810 · Apr 29, 2013 at 03:19 PM · javascriptspeedcharactermotor

error with maxbackwardsSpeed

I was coding and figuring out speeds in unity then this error came up and said something about the backwards speed, and I don't see any problems with it... could any one of you guys help me with thisk, I have been looking on this for hours so if anyone could take some time and help me that would be great! :)

Here is the error and down below that is my code (it is JavaScript! :)):

MissingFieldException: CharacterMotorMovement.maxbackwardsSpeed Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.FindExtension (IEnumerable`1 candidates) Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.Create (SetOrGet gos) Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.CreateSetter () Boo.Lang.Runtime.RuntimeServices.DoCreatePropSetDispatcher (System.Object target, System.Type type, System.String name, System.Object value) Boo.Lang.Runtime.RuntimeServices.CreatePropSetDispatcher (System.Object target, System.String name, System.Object value) Boo.Lang.Runtime.RuntimeServices+c_AnonStorey18.<>m_D ()

//My CODE!!

var PlayerState : float; var PlayerAnimations : GameObject; var PlayerMotor : CharacterMotor; var WalkingSpeed : float = 6; // The walking speed. var SprintingSpped : float = 10; // The sprinting speed.

function Update () { PlayerStateController(); PlayerAnims(); }

function PlayerStateController() { if((Input.GetAxis("Vertical") !=0 || Input.GetAxis("Horizontal") !=0)) { if (Input.GetButton("sprint")) { PlayerState = 2; } else { PlayerState = 1; }

} else { PlayerState = 0; }

} //End PlayerStateController.

function PlayerAnims() { if (PlayerState == 0) { // you can say animation.play to see a diffrence PlayerAnimations.animation.CrossFade("IdleBarrettm85", 0.4); //Smothness is 0.4 so that the transactin between the two are smotthend } else if (PlayerState == 1) { PlayerAnimations.animation.CrossFade("WalkBarrettm85", 0.4); //Smothness is 0.4 PlayerMotor.movement.maxForwardSpeed = WalkingSpeed; //max forward walking speed (!!as the variable above!!) PlayerMotor.movement.maxSidewaysSpeed = WalkingSpeed/2; //max sideways walking speed (!!as the variable above divided by two!!) PlayerMotor.movement.maxbackwardsSpeed = WalkingSpeed; //max backwards walking speed (!!as the variable above!!) } else if (PlayerState == 2) { PlayerAnimations.animation.CrossFade("SprintBarrettm85", 0.4); //Smothness is 0.4 PlayerMotor.movement.maxForwardSpeed = SprintingSpped; //max forward sprinting speed (!!as the variable above!!) PlayerMotor.movement.maxSidewaysSpeed = SprintingSpped/2; //max sideways sprinting speed (!!as the variable above divided by two!!) PlayerMotor.movement.maxbackwardsSpeed = SprintingSpped; //max backwards sprinting speed (!!as the variable above!!) } }

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 Loius · Apr 29, 2013 at 03:39 PM 0
Share

please format your code

please read the faq and/or view the video tutorial available on the right-hand side of most pages

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by therobin9810 · Apr 29, 2013 at 04:10 PM

Hah, i found the problem, i typed: maxbackwardsSpeed instead of maxBackwardsSpeed b B

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

14 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

Related Questions

How to change the sensitivity on right click (when zoomed in) 2 Answers

how to read a txt file faster ? my projects' loading time is so long ! about 30 minutes!!! 2 Answers

How do I switch the components from a character motor to a character controller? 0 Answers

Object following you? 2 Answers

Can someone help me fix my Javascript for Flickering Light? 6 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