Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: paradiseprime on March 05, 2020, 05:02:23 AM

Title: How to make list game objects inside collider more consistent?
Post by: paradiseprime on March 05, 2020, 05:02:23 AM
When the framerate is low, collisions start acting up and not working. Hell, even with a solid frame rate it still doesnt always detect collisions. If I go frame by frame it will detect every time obviously. I am using a Box Collider because any other collider doesnt work for whatever reason. [Would love a fix for that too].

Title: Re: How to make list game objects inside collider more consistent?
Post by: djaydino on March 05, 2020, 05:31:29 AM
Hi.
on rigidbody(2d) set Collision Detection to 'Continuous'
and Sleeping mode to 'Never Sleep'
Title: Re: How to make list game objects inside collider more consistent?
Post by: paradiseprime on March 05, 2020, 05:52:28 AM
This is in 3D. I already have a rigid collider on the enemy getting hit unless I need to also put it on the weapon?
Title: Re: How to make list game objects inside collider more consistent?
Post by: djaydino on March 05, 2020, 08:35:47 AM
Hi.
For 3D set Collision Detection to 'Continuous' or 'Continuous Dynamic'

if many windows are open/visible while playing you can get a lot of lag from them.
but even when playing fullscreen you can still have lag due to editor.

for performance it is best to test in a build.
Title: Re: How to make list game objects inside collider more consistent?
Post by: DanielThomas on March 05, 2020, 01:25:38 PM
I think 'Continuous Speculative' is what you're looking for, read more here:
https://docs.unity3d.com/Manual/ContinuousCollisionDetection.html

If it's not available in your Unity version: I used to make a raycast before moving the rigidbody, so an raycast from the current position to the new position and only move if it hits something. A bit more work, so the Continuous Speculative defenitly seems like a good option.