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 /
This question was closed Aug 18, 2016 at 01:09 PM by martijnvanginkel for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by martijnvanginkel · Aug 18, 2016 at 05:15 AM · c#2d game2d-platformernoobeasy

Noob Question -- Programming 2d platformer

So I want my character to go through a door and come out of another door. Now the script that I wrote works fine for one pair of doors. When I copy (duplicate) my set of doors, my character still goes to the first 2 doors. Even though the doors that I dragged into the public 'doorone' and 'doortwo' field are different. Why is this not workingalt text?

@levoTNTO So I have 4 doors in total. Door 1 is attached with door 2 and door 3 is attached with door 4. If I stand on door 4, I want it to go to door 3. But instead its going to door 1. All the doors have a collider and my player has a collider and a rigidbody. I'm stuck with this problem for a long time now but I think my code is just wrong in some way

alt text

schermafbeelding-2016-08-17-om-193603.png (306.2 kB)
schermafbeelding-2016-08-18-om-125444kopie.png (44.8 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

  • Sort: 
avatar image
0
Best Answer

Answer by Xitech_ · Aug 18, 2016 at 10:03 AM

Does the door have a collider attached? Without a collider your player cant have physics to that door. And I asssume the player has both a collider AND rigidbody? And are you sure the code is on another object again? And are you sure the correct door is attached?

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

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

How can I flip only my 'Player' gameobject, and l leave it's child object alone? 2 Answers

Jumping from special jump orb 1 Answer

HOLD JUMP BUTTON TO JUMP HIGHER 2 Answers

Multiple Cars not working 1 Answer

How do I stop a stopwatch/timer and display it on the end screen when the player hits the last Box Collider?,How do I stop the timer and display it on a new scene when the player hits the last BoxCollider2D? 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