Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 ruralbrewer · Jun 21, 2011 at 03:15 PM · positionrespawnlerpz3dplatformtutorial

3d Platform tutorial respawn wrong location

Hi, I recently worked my way through the Lerpz tutorial. I loved it, and was inspired. So I went on to create a new level (as suggested). I created a terrain, and then used the assets from the tutorial to create a different layout for Lerpz. All has gone well, except for one thing. The player respawns in the wrong location - not on the respawn platform.

I placed three Respawn point, named them, and set the initial respawn as the first one. But Lerpz gets dropped off to the side of my newly created layout. I added some debugger logs to the script and I can see that the proper location is actually being passed, but somehow Lerpz is ending up elsewhere.

Anyone have any idea what would be causing this? I have tried replacing the respawn points, and reconnecting everything, but I get the same result. If I manually set the player position as the location that is passed in the script, he is right where he's supposed to be. I am running out of ideas.

Comment
Add comment · Show 2
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 Chris D · Jun 21, 2011 at 03:54 PM 0
Share

@Yanger_xy if you need to ask for clarifications on a question, please use the question's comment area. The answers section should be reserved for solutions.

@ruralbrewer like Yanger said, we'll need to see code before we can offer much help.

avatar image ruralbrewer · Jun 21, 2011 at 06:18 PM 0
Share

Wow. Sorry. I guess I will just keep working it out myself. I thought maybe someone who was familiar with the tute might have an idea.

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Yanger_xy · Jun 21, 2011 at 03:28 PM

I haven't looked the Lerpz tutorial.Can you post some code?

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 ruralbrewer · Jun 21, 2011 at 05:38 PM

If you haven't gone through the tutorial, then I don't think you are going to be much help. Even more of a point is that, being new to this and having just gone through the tutorial, I wouldn't be sure what code to post. Other than adding debugger log statements, I have not changed the code at all, and it works fine in the original scene. The issue could be with the player, the respawn platform, the configurations in the inspector, the levelStatus code, the respawn code, perhaps even the terrain that I added. I certainly can't post the entire project. But thanks for responding.

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 Chris D · Jun 21, 2011 at 05:47 PM 0
Share

Please post clarifications either as comments or edits on your original post until you're able to (i.e. hit the karma req's) post comments on solutions directly. The answer space should be reserved for solutions.

avatar image
0

Answer by ruralbrewer · Jun 25, 2011 at 01:10 PM

Just in case someone runs into this same issue, I figured out the cause. Lerpz is getting respawned in the right place... however, he retains his "momentum". So, for example, when Lerpz is killed by a copper, the enemy hit knocks him off of his current position. So when he is respawned, he is still moving. In my case, he was being respawned onto a relatively small platform, so by the time he reappeared, he was off the edge. He then just fell to the ground (the terrain that I added).

I tried different methods to stop his motion as part of the death script, but I was unable to accomplish this. My hack fix was to simply add a yield (1.6) to the beginning of the death script. This gives enough time for Lerpz to come to stop again after being hit. This works well enough for my purposes here.

I, of course, plan on learning a better way to deal with this in the future, but I have plenty of things yet to learn in Unity, and for now, I can move on.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Respawning in the Air. 1 Answer

Sounds of popping and slurping in Lerpz tutorial after Respawn section implemented 1 Answer

Respawnscript doesn't work as expected 1 Answer

3D platformer tutorial problem 1 Answer

Respawn item again once it is destroyed. 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