You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects with attach transform can be oriented incorrectly when snapped to a snap zone.
User Ashes apparently solved this:
The snapzone script has two functions:
ForceSelect
DrawHighlightMesh
These functions are using attachtransform's transform for the snapped object. But there is an assumption here that the AttachTransform is the gameobject having the snapzonepreviewdrawer script. I simply added same condition in both these functions to check if the attachedTransform gameobject is having the snapzonepreviewdrawer script, if not then parent is used. (ofcourse I am assuming as well that the AttachTransform could only be either gameobject with SnapZonePreviewDrawer or direct child that gameobject).
Okay I conclude it is an issue but your solution (I put into the zip file) might not be a fix for all use cases.
I leave this open for now if anyone wants to try to figure it out.
Objects with attach transform can be oriented incorrectly when snapped to a snap zone.
User Ashes apparently solved this:
The snapzone script has two functions:
These functions are using attachtransform's transform for the snapped object. But there is an assumption here that the AttachTransform is the gameobject having the snapzonepreviewdrawer script. I simply added same condition in both these functions to check if the attachedTransform gameobject is having the snapzonepreviewdrawer script, if not then parent is used. (ofcourse I am assuming as well that the AttachTransform could only be either gameobject with SnapZonePreviewDrawer or direct child that gameobject).
SnapZone.zip
Tracking internally via MP-2143
The text was updated successfully, but these errors were encountered: