Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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
1
Question by genelikespie · Aug 09, 2015 at 05:33 AM · collisioncharacter

Don't know how to Move character with platform underneath.

I made it so that a player when he is on top of the platform he moves with the platform, but is there a way so when i hit the platform from underneath the player will move with the platform/get stuck with it, until I hit a button?

This takes place in a 3d environment, first person character is underneath a moving platform using this tutorial https://www.youtube.com/watch?v=AfwmRYQRsbg

"the following is a trigger box around that of the platform"

void OnTriggerEnter(Collider other){

  if (other.tag == "human") {
      other.transform.parent = gameObject.transform;
      print ("holding");
  }

}

void OnTriggerExit(Collider other){

  if (other.tag == "human") {
      other.transform.parent = null;
      print ("out");
  }

}

currently have that and have print to help me debug. Essentially from the youtube video be able to jump up and get stuck with the platform and move with it. untill you hit a button. Kinda stuck on where I should go from there, turn off gravity and make the character free floating? Or is there a way to keep the player without something underneath to help him continue to move.

Other interesting notes, if the platform is close to the ground and the player is touching the sides the platform will move the player. Also when the player is touching the ground and the platform is essentially at the character's head, the platform will move the character with the platform. Im trying to get it so if the platform is off the ground when the player jumps up and touches the trigger box he would go with the platform.

Goal: Have a player underneath this moving platform and the player will move with this platform while being under it, and not touching the ground at all.

alt text

Thanks!!!

picplatform.png (3.0 kB)
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
Wiki

Answer by Sethhalocat · Aug 09, 2015 at 07:50 AM

Actually, you can import the fps character from unity 4 and all you need is a sprint script along with the walking sound. Sorry this is a short answer but there isn't much to it...

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 genelikespie · Aug 09, 2015 at 08:56 AM 0
Share

I have one of the characters right now, from unity package but it wont attach to the platform from down under also i edited so it shows a better understanding of what im trying to do.

avatar image Sethhalocat · Aug 09, 2015 at 09:38 AM 1
Share

I actually believe that all you need to do is move the character up there but the camera blow the platform so it gives the visual effect of being under ins$$anonymous$$d of actually being above. and if you want you can add your own separate invisible collider by the camera and attach it to the camera as children :D

avatar image genelikespie · Aug 09, 2015 at 09:58 AM 0
Share

So essentially move the character up once it hits the trigger box under the platform so the character doesnt fall off but the camera is still in the same place, then with a button press or once the collision ends move the character essentially back to its original position :)?

avatar image genelikespie · Aug 09, 2015 at 09:39 PM 0
Share

Now assu$$anonymous$$g i added hands into the mix so you could see some part of the body, will this be ok still?

avatar image Sethhalocat · Aug 14, 2015 at 06:15 PM 0
Share

yes it would :)

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Skined Cloth 0 Answers

How to get a Character to move with a moving platform ? 6 Answers

My Player dies only when he wants to?!? 1 Answer

Character Controller - Collision Detection 1 Answer

Two Basic Physic Questions (Gravity and Jumping) 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