These two properties are meant to help with positioning and resizing huge, non-physical objects (such as backdrops), or for improving performance when dealing with small details.
Together, these two properties can serve to make parts act similar to parts with a *Mesh
object in them, replacing much of *Mesh
object’s functionality.
CollisionsDisabled
will disable all collision detection for a part. Unlike CanCollide
, CollisionsDisabled
will turn off all calculations for collision detection. Collision detection is still done with CanCollide
parts for things like the Touched
event. On a CollisionsDisabled
part, Touched
will never fire and it will never fire Touched
on another part. Constraints, Body*
objects, and gravity will still affect the part.
Its purpose is to lessen the performance impact of positioning and resizing huge parts, and to lessen the performance impact of having many small, detailed parts in one location.
VoxelShadowsDisabled
will disable voxel lighting calculations for a part. Some parts, such as backdrops or constant, skybox-like elements, should not ever cast shadows. On these parts, doing any voxel lighting calculations is a waste of performance. This is also sometimes true for very small parts, which would never cast a shadow anyway.
Note that these parts still receive color and lighting information from the voxel grid, but they cannot cast shadows too it. This is similar to if a part had a *Mesh
object in it with a huge scale.
A poll to gauge developers’ interests in these two properties:
- CollisionsDisabled
- VoxelLightingDisabled
0 voters
Performance Issue Reproductions
I made some ‘bug repros’. A ‘stutter’ is defined as the FPS dropping below 30 (where it normally rests at 60). Feel free to open up the scripts and make the parts invisible in order to demonstrate that these are physics performance issues. These are done with anchored, CanCollide = false
parts.
Changing CFrame
, Size
, then CFrame
according to this post:
LargeCollisionsSize.rbxl (12.8 KB)
Run in studio run mode.
Parenting w/ changing size: LargeCollisionsParenting.rbxl (12.8 KB)
Run in studio run mode. This parents the part to nil, changes the size, then parents it back in order to circumvent the collision checks being done when size is changed normally. There is still stutter on every size/parent change.
Changing CFrame without parenting: LargeCollisionsCFrames.rbxl (12.7 KB)
Run in studio run mode.
Small changes in CFrame do not cause stutters below 30 FPS. Large ones (such as the ones in this example) do.
Many small parts in one location: ManySmalls.rbxl (13.3 KB)
Run in studio play solo mode.
If you put the parts between the character and camera, the FPS drops greatly due to collision checks involved with raycasts.
If you walk through the parts with a sideLength of 10 (1000 parts) it will stutter.
I admit that this is not a huge issue, though it might be if the character had many parts, for example. It might also be an issue on less powerful computers and platforms, such as Android and iOS.