OfyDevv
(OfyDevv)
August 18, 2018, 9:13pm
#1
I’ve heard around from a few buds of mine that if there is ever any bricks that are for more decoration purposes and not playable purposes, it’s best to make them CanCollide off since by doing so; it stops the Physics engine (which is used to block the player from entering the brick) which helps with lag, is this true?
6 Likes
PeZsmistic
(PeZsmistic)
August 18, 2018, 9:19pm
#2
It could have a positive impact. However, the scale of that impact I’m not sure of. Personally, I would still turn collisions off for parts you don’t need to explicitly collide.
Disclaimer: I am not a statistician.
For curiosity’s sake I was mucking around with Studio today trying to see if I could measure the gain from using noCollided parts. I settled on trying to measure the difference in PhysicsStepTime for different scenarios.
These are just rough numbers because I didn’t have time to run a bunch of trials.
These were collected on a baseplate with a stack of 1513 anchored, “touching” parts. Parts were 72x53 and 0.05 studs thick for the trials not involving intersections, and 1 stud thick when doing trials involving intersections. The camera was not moved between trials. There were four trials for each stat, each trial an average over 30 seconds. All four trials were averaged to produce each of the numbers below.
With collisions, with intersecting parts = 0.0185ms
With collisions, no intersecting parts = 0.0197ms
No collisions, with intersecting parts = 0.0129ms
No collisions, no intersecting parts = 0.0152ms
PhysicsStepTime for “No collisions, with intersecting parts” is 30.27% less step time than “With collisions, with intersecting parts”.
PhysicsStepTime for “No collisions, no intersecting parts” is 22.84% less step time than “With collisions, no intersecting parts”
These are very small numbers to begin with, and I am not a statistician, so I’m not sure if any of this is significant, but it doesn’t look like these differences are imaginary. By removing collisions (but nothing else) we appear to shave down physics step time by a significant amount.
4 Likes
Mikastrae
(Mikayla)
August 18, 2018, 9:28pm
#3
It’ll definitely help with the performance but only if the region that the part is in is interactive.
4 Likes
Extuls
(Extuls)
August 18, 2018, 9:45pm
#5
I would watch the video @mircostaff linked. It already supplies the answer to the question, which isn’t this.
2 Likes
H_mzah
(H_mzah)
August 18, 2018, 9:48pm
#6
I worded my post wrong, as it was what is said in the video, because I’ve read on a previous post by someone asking for optimisation tips that CanCollide false will help in interactive regions. Thanks for clearing it up for me.
2 Likes
nurgenius
(nurgenius)
August 18, 2018, 11:05pm
#7
Remember to mark replies as “answered” if they satisfy your question.
CanColide Doesn’t fix lag , but it does use a little ammount of lag.
OfyDevv
(OfyDevv)
August 21, 2018, 10:48pm
#10
Yea, that’s why making it disabled for useless parts can help fix lag.