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 JustMoser · Jan 15, 2015 at 10:51 AM · cameraphysicsmultiplayercollisionsfrustum

Raycasts, Collisions, and Triggers outside of Camera frustum NOT WORKING

Okay I have been fighting with this for awhile now and I cant find anything to help on here. I saw a few people asked and one guy said yes physics are still calculated out of the frustum, which is true because my character controllers still work outside the camera but not the events I need.

Anyway I have a fps multiplayer game supporting both dedicated and listen servers all authoritative. If the player is also acting as a server and his camera is not facing the other players Raycasting on their colliders, collision events and trigger events will not go through reliably (occasionally an event will work) after they die and their ragdoll colliders and rigidbodys are activated and then deactivated. Their damage colliders which work at first will work again if the server glances at them after the ragdolls have been deactivated. The damage colliders remain on along with their rigidbodys the entire time. They are set to only collide with what I need them to in the physics layers.

I'm guessing when the servers camera glances at them it does some type of refresh on the colliders and rigidbodys? If I'm in the editor and the scene view(but not the players camera) is looking at them it will work too. If the dedicated servers camera is not oriented in a way that the players are always in the frustum it will not work.

Notes for common suggestions:

Their damage colliders all have kinematic rigidbodys on them. I am raycasting specifically at their layer. Two kinematic rigidbodys never need to collide, occasionally they need to collide with a kinematic trigger or a nonkinematic rigidbody. Yes I have tried continuous and continuous dynamic properties for the rigidbodys these had no effect. The timing is already at 0.1666 when lowered even more it still had no effect. Everything works correctly, however, if the rigidbodys are within the servers frustum. I can be sure they are being replicated properly when the server is not facing them because the server is authoritative and both clients have the same positions for each other when not faced by the camera etc. Another big problem is a camera MUST be active or no raycasts triggers etc will work at all!? This is a shame for the dedicated server.

My only solution is to have a second camera active that oversees the entire map, then activate my players camera which overrides the other camera while still keeping it active. Under this scenario all events work correctly but it severely effects the fps of the server player. I tried putting only the layers I need to collide in the layermask of the overseeing camera but it seems its an all or nothing deal for it to work properly.

I am very surprised at this behavior since others seem to suggest that yes the physics should still work outside the frustum and that I could find really no one else who had trouble with it. I can only hope that I am ignorant and there is a common solution. Thank you so much for taking the time to read this and help me! I'd love to hear your thoughts.

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

0 Replies

· Add your reply
  • Sort: 

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

2 People are following this question.

avatar image avatar image

Related Questions

How to make first-person work in zero-G with planets? 1 Answer

Mesh Collider colliding with Primitives is jittery 1 Answer

Match camera frustum's near plane to 3D plane 1 Answer

Screen position out of view frustum error, cannot solve? 1 Answer

Camera gets flung off of the map when the player collides with certain objects. 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