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
1
Question by Moltvatch · Feb 12, 2011 at 08:17 PM · playerscenefpscharacterteleport

I need to teleport a FPS chara controller

How to teleport a character? I mean the player from a scene 1 to a Scene 2?

And is it possible to link the triggers,variables or switchs between two scenes?

Thank you.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Jesse Anders · Feb 12, 2011 at 10:02 PM

And is it possible to link the triggers,variables or switchs between two scenes?

Of course; very rarely is it 'impossible' to do something of that sort.

To 'teleport' the character from one scene to another, you'll want to use Application.LoadLevel() to load the new scene, and then (if necessary) position the character at the appropriate location in the scene.

As for data that persists between levels, here are three options:

  1. Static member variables
  2. DontDestroyOnLoad()
  3. PlayerPrefs
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 Moltvatch · Feb 15, 2011 at 12:30 PM 0
Share

listen I've made a script here but it doesnt work here is it :

function OnTriggerEnter(other : Collider) { if (Input.Get$$anonymous$$eyDown ("e")) Application.LoadLevel (1); }

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

Is there anyway you can tell me what's wrong with it? or even tell me what script i should use?

avatar image Jesse Anders · Feb 15, 2011 at 01:29 PM 0
Share

You don't want to use Get$$anonymous$$eyDown() (or the Input class in general) in OnTriggerEnter(), I don't think. One way or another, you'll probably need to rearrange your logic so that the collision is detected in OnTriggerEnter(), but checking for input happens in Update().

avatar image
0

Answer by Moltvatch · Feb 12, 2011 at 10:45 PM

Ok thank you then!

Comment
Add comment · Show 3 · 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 Uriel_96 · Feb 12, 2011 at 10:52 PM 0
Share

please, this is not an answer, use comments to comment or thanks for something, answer as the name says is to answer a question not to thank for something.

avatar image Moltvatch · Feb 12, 2011 at 11:19 PM 0
Share

I'll call you when I need some idiot to make me advices.

avatar image Jesse Anders · Feb 13, 2011 at 02:04 AM 1
Share

Thanks for the thank you :) But please, don't be rude to your fellow forum members. Posting a comment or reply as an answer is a common mistake - no biggie. Uriel was just making you aware of how the forum works for next time.

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

Teleport the player from A to B 2 Answers

How Move Player between Scenes? 7 Answers

FPS Character with model 6 Answers

I CANT FIND THE OBJECTS IN MY SCENE! Please HELP 1 Answer

How to keep same player settings from the scene in the .exe file 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