Skip to content

Commit

Permalink
fix(Interaction): ensure the collision detector is set on custom models
Browse files Browse the repository at this point in the history
The Interact Touch script was not having the custom collision detector
set if the controller model was custom. This fix ensures it is set
correctly.
  • Loading branch information
thestonefox committed Dec 12, 2017
1 parent d7f5346 commit 0f709d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -635,7 +635,7 @@ public virtual void ToggleHighlight(bool toggle, Color? highlightColor = null)
public virtual void Highlight(Color highlightColor)
{
VRTK_InteractObjectHighlighter interactObjectHighlighter = GetComponentInChildren<VRTK_InteractObjectHighlighter>();
if(interactObjectHighlighter != null)
if (interactObjectHighlighter != null)
{
interactObjectHighlighter.Highlight(highlightColor);
}
Expand Down
Expand Up @@ -260,6 +260,7 @@ protected virtual void Awake()
protected virtual void OnEnable()
{
destroyColliderOnDisable = false;
controllerCollisionDetector = (customColliderContainer != null ? customColliderContainer : controllerCollisionDetector);
VRTK_PlayerObject.SetPlayerObject(gameObject, VRTK_PlayerObject.ObjectTypes.Controller);
CreateTouchRigidBody();
trackedController = GetComponentInParent<VRTK_TrackedController>();
Expand Down

0 comments on commit 0f709d7

Please sign in to comment.