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 benk0913 · Dec 22, 2012 at 02:07 PM · instantiatenetworkphotonclientroom

PhotonNetwork.Instantiate 2 problems.

I have these two problems with PhotonNetwork.Instantiate...

1) Whenever the player gets instatiated it wont react to collision and will constantly fall (Uses 'Character Controller') untill the player provides input which moves the character ( like 'a' or 'd' and the char gets to collide and function correctly).

2) Clients can only see other clients which instantiated AFTER THEY joined. It goes like this:

Player1 has joined.

Player2 has joined.

Player1 can see player2, player2 cant see player1.

Player3 has joined.

player2 can see player3, player1 can see player2 & player3, player3 sees no one.

Please, help me!

Comment
Add comment · Show 3
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 benk0913 · Dec 24, 2012 at 09:47 PM 0
Share

Come on.. its not that hard.. :\

avatar image benk0913 · Jan 03, 2013 at 06:59 PM 0
Share

I am still stuck... Tried to follow the tutorial but everything should make sense..

avatar image gfvfubb · Jan 30, 2013 at 01:28 PM 0
Share

Have you tried the Angry Bots Photon Demo? It has working multiplayer instantiation. I modified it and am using it currently and it works as you want. The Code - Game$$anonymous$$anager.cs script instantiates the playerPrefab you want and it has a movement controller and camera controls and a collider capsule.

Try stripping it down like this and modifying your code to run on top of it: http://unitycoder.com/blog/2012/12/15/photon-networking-multiplayer-game/

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Jamster · Dec 25, 2012 at 05:17 PM

Remember that when using a Character controller you need to manage the gravity yourself, meaning you need to only move the y axis down when you aren't grounded. This might not solve your problem but I usually forget.

As for the second one I've had this problem with unity Networking but not with Photon, annoyingly I didn't solve it... All I can reccomend is to have a look at the Marco Polo tutorial for the instantiating routine then compare it to yours (even copy and paste bits across). My photon game was built around the Marco Polo tutorial so I never had to bother with the instantiating code, I just adapted the script for my use.

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 benk0913 · Dec 26, 2012 at 07:40 AM 0
Share

Jamster, the character wont have these issues of collision in case of a regular instatiate... Just photons.. I also followed marcopolos tutorial to make this one... I tried to update the photon but it didnt help my problem either.. :P

avatar image tobiass · Jan 10, 2013 at 10:13 AM 0
Share

The problem you describe does not happen when you just join a room and instantiate GOs. It must be something you do beyond that. To debug, you could disable actions you do one by one and use simple prefabs with just a photonView on them.

Are you loading a scene when joining a room? In that case, the load might happen after (!) the remote Instantiate calls were done. The scene they were executed for is destroyed and the fresh instantiated objects are gone before you see them.

I can't help with the character controller / falling issue, sorry. $$anonymous$$aybe the problem is that multiple controllers are active and fight for control?

avatar image
0

Answer by zotey · Jan 08, 2014 at 01:11 PM

Make sure you send a buffered rpc that the first player is spawned

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 Bons · May 30, 2014 at 11:21 AM

You must be having lobby and room in 1 scene and game in another scene.

You must load scene by

PhotonNetwork.LoadLeve("Scene Name");

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

14 People are following this question.

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

Related Questions

How can I spawn a GameObject on all players in my multiplayer game? 0 Answers

Network.Instantiate and the Trusted Client problem 0 Answers

UNet, how to create Internet game (like via PhotonNetwork) 0 Answers

Network.instantiate for specified clients? 1 Answer

Network.Instantiate fired from client AND server 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