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 Moltvatch · Feb 13, 2011 at 02:56 AM · collidersceneteleporthouse

Big noob Need to know how I can make that

I want my fps camera to teleport to another scene when it press a button.

Let's put it like this. I've got a house, I want the character to be teleported to another scene (that will be the house interior) when he presses a button of my choice in front of the door.

Can someone tell me how can i do taht on script or even better! to give me the whole script, because Im seriously a great noob, I've search for a very long time what command lines I should use but i didnt find any!

PLEASE HELP ME!

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

Answer by Thom Denick · Feb 13, 2011 at 03:29 AM

There are an awful lot of things your asking for here. Try to focus your questions in the future. Focus on one aspect of your implementation at a time.

  • You need to do a Mouse Interaction with a 3D Object http://answers.unity3d.com/questions/5339/click-on-a-3d-object-in-the-game

  • You need to Load a new scene once your button is hit: http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevel.html

  • You need to move your character to the correct position. This is a very simple scripting operation, if you need help with that, please run through some scripting tutorials!

Comment
Add comment · Show 4 · 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 Moltvatch · Feb 13, 2011 at 01:38 PM 0
Share

thing is I don't know the script for keyboard buttons, everyone seems to use inputs so I didnt understand how you write this kind of script.

avatar image Thom Denick · Feb 13, 2011 at 05:46 PM 0
Share

Ah I see, I thought you meant you wanted the player to press a button in 3D space, not the keyboard. So to check for a keyboard press you just use Get$$anonymous$$eyDown, which you can read more about here: http://unity3d.com/support/documentation/ScriptReference/Input.Get$$anonymous$$eyDown.html

avatar image Moltvatch · Feb 14, 2011 at 03:04 AM 0
Share

Thank you so much.

Listen I got another problem now here is the script i used on an object "door" mesh. function OnTriggerEnter(other : Collider) { if (Input.Get$$anonymous$$eyDown ("e")) Application.LoadLevel (1);

}

function Awake () { DontDestroyOnLoad (transform.gameObject); transform.position = Vector3(71,79,-456);

}

I used it in the door, and when I start the game the door suddenly disapear why?

I didnt turned the "trigger button" on.

avatar image Moltvatch · Feb 14, 2011 at 03:08 AM 0
Share

I made up something else, I deleted the function awake and the door didnt disapear anymore.

BUt I couldn't get the script to work.

I just want my FPS controller to teleport itself when he hits the E key in front of the door...

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

Issue with my Teleport Script 1 Answer

Animation Script not working. 1 Answer

The associated script cannot be loaded. 1 Answer

Can a script be loaded to a next scene? 3 Answers

Audio play when object hit collision. 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