Skip to content

Commit

Permalink
fix(Presence): ensure player collider height is set correctly
Browse files Browse the repository at this point in the history
A recent update to how the collider height was calculated to ensure
a scaled CameraRig would still work, ended up breaking the normal
usage of the collider.

This fix ensures the collider height works correctly at normal scale
and if the CameraRig is scaled.
  • Loading branch information
thestonefox committed Sep 15, 2016
1 parent cb6908b commit 087b567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/VRTK/Scripts/VRTK_PlayerPresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ private void DisablePhysics()
private void UpdateCollider()
{
var playAreaHeightAdjustment = 0.009f;
var newpresenceColliderYSize = (headset.transform.localPosition.y - headsetYOffset) - transform.localPosition.y;
var newpresenceColliderYSize = (headset.transform.localPosition.y - headsetYOffset);
var newpresenceColliderYCenter = (newpresenceColliderYSize != 0 ? (newpresenceColliderYSize / 2) + playAreaHeightAdjustment : 0);

if (presenceCollider)
Expand Down

0 comments on commit 087b567

Please sign in to comment.