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 tmurnane8 · Apr 12, 2015 at 09:35 PM · collisionrigidbodycharacterkinematicplatforms

Moving a player on a rigidbody platform that can collide

Hey guys I know this question has been asked a lot but I can't seem to find an answer that works for me.

So what im looking to create is a game where the player can move around on a moving platform where the platform can collide with other platforms or terrain. So i made a non kinematic rigid-body and started moving it around with forces which works great when colliding with other objects but I couldn't get my player to be able to stand on the object and move with it. I tried having my player be a character controller and parent the player to the platform but for some reason it still gets shaken off. Then i tried a more physics based way where the platform had high friction and a rigid-body on the player which kind of worked but the player would move really slowly in one direction and fast in the other and just be generally awkward to move around. I then started moving the player and platform with rigidbody.MovePosition which worked great but the platform wouldn't collide with other objects. I think this may be the right way to do it but I cant get collisions working how I would like. I feel like I've tried all the combinations but I cant seem to get it. If someone could help in this situation I would be very appreciative.

Comment
Add comment · Show 2
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 Guppie1337 · Apr 12, 2015 at 10:29 PM 0
Share

Not sure how to do this, but maybe a tip to try. The players movements are generally global units. $$anonymous$$aybe you can set the player movements relative to the moving object ins$$anonymous$$d of global. Or by doing a check to see if the player is on this moving object, and if so, the current position of your player would be his transform updated by adding the transform of the moving object.

Let's say the object is a magic carpet. Store the transform of the magic carpet in something like currentCarpetPosition (Vector3) and add that to the player object's transform.position. transform.position (Player transform) = transform.position + currentCarpetPosition. I feel like that would work but their may be something else necessary. Good luck!

avatar image aaronkchsu · Dec 07, 2016 at 08:27 PM 0
Share

This is the exact same problem that I have :L

Does anyone have a good answer for this? :(

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by RobAnthem · Dec 08, 2016 at 06:46 AM

You can create psuedogravity and make your floating object the gravity well and have a script on the player to move him to your psuedogravity.

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

2D motion/collision: physics, or direct translation? 2 Answers

isKinematic object doesnt collide with wall 3 Answers

Collision Detection for Kinematic Rigidbodies 0 Answers

How to make a ragdoll not rotate but still be non kinematic? 0 Answers

Collision between two moving objects (Kinematic)? 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