Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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
2
Question by ZanzibarDreams · Feb 18, 2010 at 12:55 PM · physicsrigidbodycharactercontrollerhingejoint

How to use character controller to push down hinge joint properly

I am working with my finished Lerpz tutorial trying to learn about unity. What I am currently trying to do is make a hinged bridge which Lerpz can push down. The bridge will then rise when Lerpz isn't on it any more.

this is what the setup looks like:

-I used the crate mesh (only mesh) from "Build your Own!" in the project pane to make a Domino shape (by scaling down x-axis). Onto that mesh I added a boxcollider, a rigidbody and a hingejoint component (with no connected body).

I have encountered some problems which I hope you could help me with!

-I have trouble getting Lerpz to push it down (he understands the collision, but does not act upon it like a rigidbody). I have tried adding a rigidbody to "Player" and also "Player->Lerpz", but that doesn't work. How would you propose doing this in a beautiful manner?

What I've done to make it work is to make another rigidbody crate and use that as a child of "Player" to push down objects, but it just doesn't feel right :D

I appreciate any thoughts you got! /Z

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 Jaap Kreijkamp · Feb 18, 2010 at 11:52 PM

Just a quick thought, don't know if it really is the best way to do it but:

You could add a trigger on the bridge to detect Lerpz, then raycast a ray from lerps down to the bridge to calculate the hit point, then add a force to the bridge at this point.

Comment
Add comment · Show 2 · 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 ZanzibarDreams · Feb 19, 2010 at 08:15 AM 0
Share

Thanks I'll give it a try!

avatar image ZanzibarDreams · Feb 19, 2010 at 03:11 PM 0
Share

I solved it, not using a trigger but raycasting from Lerpz to the bridge and using AddForceAtPoint. Since I have a spring on the bridge it is quite twitchy, so I have to find a good distance and angle for the ray to be cast(so i can stand on the bridge aswell). Thanks!

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

No one has followed this question yet.

Related Questions

Character Controller Jittering 0 Answers

Character Controller children of a car: Inertia effect, delay effect, what??? 1 Answer

Character controller jittering up and down 2 Answers

RigidBody Character Controller Bug 0 Answers

jet pack physics with character controller 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