Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by JustRoss · Oct 23, 2015 at 08:53 PM · movementrigidbody

Rigidbody weird effect.

Hello guys, I have recently started digging into unity. I want to make a small project where you walk around a box and shoot things, but I'm getting some undesired effects. When I press play and walk into a wall, the object starts flying everywhere. I know that doesn't really help, so I have attached a link to the project https://www.dropbox.com/s/5ydegx5esg2ovkc/The%20box.zip?dl=0

Edit: The object is the player (just the camera), I've made it move with WASD. Removing rigidbody makes the object go through the walls setting iskinemtaic to the object makes it go through walls. Changing the weight doesn't remove the problem.

I have done some testing and found out that the effect is not present when I have the script for mouselook disabled

The script was not made by me, but I can not find anything that would effect its position. http://pastebin.com/ARzUQupN

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

3 Replies

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

Answer by JustRoss · Oct 24, 2015 at 01:43 PM

Found out the problem was infact in the mouselook script, ive replaced it with another one and it works. If anyone can tell me what was causing it inside the script, that would be great for future knowledge, but you don't have to.

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 SniperEvan · Oct 24, 2015 at 06:38 AM

I'm on my phone so I can't download the project.

If the object in question doesn't need to move you can take off its rigid body and then it won't get pushed by the player. Or you can set the rigid body to "iskinematic". Then it won't be pushed by physics forces (usually just used for the player object, not static objects). A third option is to increase an objects weight.

If you need a different solution/info let me know.

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 TheLazyTurtle9 · Oct 24, 2015 at 01:39 PM

@JustRoss

You might be a bit mad at the answer that I found for you...

Go into the Player(Camera) in the hierarchy -> Rigidbody -> Constraints -> And Click Freeze rotation in the X, Y and Z axis

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Problem with rigidbody 2 Answers

Rigidbody going through Colliders help! 1 Answer

Help converting a character controller script to rigidbody 1 Answer

Determine the direction an object is actually moving? 0 Answers

Colliders "offset" and going down too. 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