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 mdinizzz · Jan 03, 2012 at 11:44 PM · respawnrespawning

respawn player problems

Hello, I'm having trouble with my player respawn .. the model arises when the player is changing position "looking up" is not on the same position before!

static var lives: int = 3;

var player: GameObject;

function Update () { }

Respawn function () { WaitForSeconds yield (1); Instantiate (player, Vector3 (-0.3,0.4, -4.7), transform.rotation);

 }

this is the script for the player to respawn when he dies and is born he is "looking" up and completely change the controls! help me please .. how do I get the player standing on the same position? There is another reference to respawn I test?

Comment
Add comment · Show 1
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 HHameline · Jan 10, 2012 at 08:53 PM 0
Share

$$anonymous$$ark this question as answered please :D

5 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by kievar1983 · Jan 04, 2012 at 03:42 AM

if you are loading from a prefab, use the prefab's transformation and rotation, if not store the player's orientation in a temp object right before he dies and orient the new player looking and facing the same way the temp object was.

Comment
Add comment · Show 1 · 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 mdinizzz · Jan 04, 2012 at 06:45 AM 0
Share

hello, well my player starts with the rotation axis x: 270, Y: 180 and Z: 0, prefab it begins, so that when I use this script it resets all the rotation and the player is looking up .. there is something for him to change the rotation axes when they respawn? and thank you for the feedback

avatar image
0

Answer by pravinyadav · Jan 04, 2012 at 05:13 AM

Pls recheck where u r attaching this script. transform.rotation might be referring to that gameobject. As kievar pointed , always use prefab for instantiation. Have a look at http://unity3d.com/support/documentation/Manual/Prefabs.html

Comment
Add comment · Show 1 · 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 mdinizzz · Jan 04, 2012 at 06:45 AM 0
Share

hello, well my player starts with the rotation axis x: 270, Y: 180 and Z: 0, prefab it begins, so that when I use this script it resets all the rotation and the player is looking up .. there is something for him to change the rotation axes when they respawn? and thank you for the feedback

avatar image
0

Answer by mdinizzz · Jan 10, 2012 at 08:41 PM

done .. placed inside the empty game object with the coordinates 0 and it's all ok ..

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
avatar image
0

Answer by mdinizzz · Jan 10, 2012 at 08:41 PM

done .. placed inside the empty game object with the coordinates 0 and it's all ok ..

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
avatar image
0

Answer by mdinizzz · Jan 10, 2012 at 08:40 PM

done .. placed inside the empty game object with the coordinates 0 and it's all ok ..

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

(Solved!) OnEnable spams error messages 1 Answer

Respawn System not Moving Character 0 Answers

Why can't I make my character die? 3 Answers

How to get your player to respawn when in void (C#) 2 Answers

Can you guys Help me create a spawn mechanism where the player actually respawns in a platform(check for more details) 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