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 deets · Mar 25, 2014 at 10:39 AM · rigidbodystaticfrictiondrag objects

Object not moving with ground with physics material.

So I basically have 2 objects, one being the hero on a snowboard with that snowboard being used to check different grounds it is sliding over or to activate triggers. The other being a circle shaped magnet that is rotating.

The result I'm trying to get is when the hero enters the trigger of the magnet it gets attracted to the magnet. When it's stuck to the floor of the magnet it should rotate together with the magnet. I got everything working except for the rotating part. The hero is stuck to the magnet but stands still on one position with the magnet rotating underneath the board.

So a bit more in detail. the board has a rigidbody component and underneath (child) a gameobject with a capsule collider so I would be able to check if it enters the collider of the magnet.

The magnet has 2 gameobjects underneath it. One with a collider that works as a trigger and the script for attraction where I change the gravity of the world into a point gravity towards the magnet calculated with the position of the hero and position of the magnet when entering the trigger. The other gameobject is a ragespline that holds a physics material with static friction so it won't slide over the circle and in my opinion should drag the hero along when rotating since it actually does prevent the hero from sliding, but the dragging along doesn't work.

I have tried modifying the physics material, modifying the rigidbodies drag and angular drag. But nothing seems to work to get the hero to rotate with the magnet. Anyone who has an idea or can help me out?

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

1 Reply

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

Answer by Dblfstr · Mar 25, 2014 at 02:42 PM

If you are moving the magnet by its transform.position, there will be no collision interaction. You have to use forces to move rigidbodies. It sounds like your magnet or ragespline (whichever needs to 'move' the player) needs a rigidbody and its movement should be controlled by AddForce, or AddTorque, etc.

Comment
Add comment · Show 5 · 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 deets · Mar 25, 2014 at 03:29 PM 0
Share

I actually read this already when searching before asking this question. But the AddTorque didn't seem to move or have an effect on my magnet at all. I'll give it another go and keep at it till the thing is moving with AddTorque.

avatar image deets · Mar 26, 2014 at 09:26 AM 0
Share

This actually did the trick :) thanks for the feedback :)

avatar image Dblfstr · Mar 26, 2014 at 01:38 PM 0
Share

Glad it worked. If the questions is adequately answered, please mark it as such and close it. :D

avatar image deets · Mar 27, 2014 at 08:04 AM 0
Share

Since this is my first question not sure how to do that xD

avatar image Destran · Mar 27, 2014 at 08:09 AM 0
Share

Little grey circle with a checkbox in it underneath the thumbs up/thumbs down.

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

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

Related Questions

RigidBody Jitterbug Question.( PhysicMaterial.Static) 2 Answers

should I remove unused rgidbodies? 1 Answer

Undesired friction when multiple objects are colliding with a rigidbody. 1 Answer

Sphere friction? 1 Answer

Why Physics Material Max Friction is not really Max? 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