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 WhiskeyJack · Nov 01, 2010 at 09:45 AM · prefabmultiplayerspawnorientation

Multiplayer prefab spawns with wrong orientation

I'm testing multiplayer with Smartfox. For this I'm adapting the Island demo. I now got it working in third person view and replaced the frog (Lerpz) with the construction worker model from the standard assets.

Now I'd like the remote players to also spawn as the construction worker, but the model always spawns on its side (he's floating on his back) and does not animate. I attached the same scripts and defined the animations. I think it might have something to do with this line that spawns the remote player, but the scripting manual is very limited on Quaternion (it says not to modify this directly...).

UnityEngine.Object remotePlayer = Instantiate(remotePlayerPrefab, new Vector3(-10000, -10000, -10000), new Quaternion(0,0,0,1));

What would I have to change to get the orientation correct? Any pointers for fixing the animation are also welcome ;-)

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
0
Best Answer

Answer by WhiskeyJack · Nov 03, 2010 at 03:36 PM

I kinda solved this (still very new with characters, objects and animation). Turned out I did not use the right (parent) component for the remote player. When I used the "Constructor" object (under Standard Assets > Character Controllers > Sources > PrototypeCharacter) the orientation was correct. Previously I tried with "construction_worker and "Bip001" that both have "Constructor" as a parent.

I think I could not get the orientation right the first time because the rotations I tried were applied to the parent game object and not the model (and I couldn't figure out how to fix that in a timely manner).

Solved the animation part now as well. Originally the demo works with the FPS walker script. Because I switched to a 3rd person view with the corresponding script, the "Sendmessage" commands that are in the FPS walker scripts were no longer being fired. After adding these to the 3rd person script, for example SendMessage("PlayAnimation", "walk"); the animations are playing :-) Still flickers when the player is idle though.

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 waqaraliu · Sep 20, 2012 at 05:29 PM 0
Share

i have my animations attached to player controller script for multiplayer fps.. how can every player in the network can see those animations..its really annoying for me with very little knowledge of sending animation across network..any help

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

1 Person is following this question.

avatar image

Related Questions

Where did the avatars go? Multiplayer spawn prefabs 0 Answers

repeat object spawn 3 Answers

Destroy and Spawn an Enemy 1 Answer

creating animation made my each prefab spawn at same position 1 Answer

How to manually handle multiplayer prefabs spawning with our own script ? 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