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 SomeGuy22 · Jul 15, 2019 at 02:17 AM · physicsperformanceprofiler

Profiling mysterious "Phase Core: Trigger Interaction Work"

I've been running profiling tests to improve the performance of my game, and I've discovered something that seems to be hogging an absurd amount of resources. The function in question is called "PhysX.ScNPhaseCore.triggerInteractionWork".

alt text

It's using up 40ms, which seems way too high compared to rest of the items listed there. I have a rough idea where this call is coming from, but I don't know exactly what objects are causing it occur. What's more is that I don't know why it's being made exactly, and why there are 173 calls of it. There's nothing in the documentation that lists what it does, but I'm assuming it has to do with the OnTriggerEnter function; which is strange, because there's already a profiler item for those types of calls under Physics.ProcessReports. It's true that I have many triggers in my scene, but the problem only seems to flare up when a few entities enter just a couple overlapping triggers. I even tried restricting the Physics layer to see if my triggers would ignore some moving parts on the enemies, but it didn't seem to help. Maybe the problem is coming from somewhere else...? But I have no clue where to look since, even in a Deep Profile, there's no information on what objects called it. In the "show related objects" everything is just N/A.

Does anyone know what this function is supposed to do? How can I track down what's causing it be called so many times? Do I have to just use trial and error to eliminate the possibilities one by one? Thanks in advance!

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

Answer by GreenPandaStudios · Feb 24, 2021 at 03:27 PM

@SomeGuy22 I'm having the exact same issue. Everything is perfectly optimized to run well over 60 fps, and suddenly there are these massive spike in Physics processing due to PhysX.ScNPhaseCore.triggerInteractionWork. Were you able to find a fix for this annoying issue? Or learn anything more about what's causing it?

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 SomeGuy22 · Feb 24, 2021 at 05:41 PM 0
Share

There is no specific fix, I think this is just the work that Unity is doing to process Triggers. If you have a lot of moving rigidbodies inside triggers (even kinematic) then it causes the OnTriggerEnter etc. callbacks. If your trigger itself is a rigidbody (even kinematic) then any collider that moves within it will also get the callbacks. Unfortunately there seems to be no way to track down which objects are causing the spikes in that call, at least none that I've found yet. That would be a huge help in finding what to optimize.

Instead for a different game I worked on I was able to just split my triggers/collisions into more layers and manage the collision matrix so that colliders that didn't need the trigger calls would be ignored when they're inside the trigger. Specifically a case was that I had ragdoll components on a character and I could disable collision between those components and the trigger box they were moving inside. Other than that there is just nothing more you can do for now, sorry. Reducing the amount of calls to it (the amount of trigger interactions) is a concrete number you can try to decrease for more performance.

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

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

Related Questions

Should rigidbodies be destroyed as they fall out of stage? 1 Answer

Moving Colliders giving me Physics.simulate spikes in Profiler 2 Answers

Profile physics.simulate 1 Answer

Spikes with Physics.Simulate() in empty scene? 0 Answers

Active rigidbodies and number of Contacts 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