Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Assets/ChaiTea/Scripts/HapticCylinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ protected override void Awake()

//Chai3D cylinder position is at bottom
//Unity cylinder position at middle
//Apply the offset.
Vector3 offset = new Vector3(0, -this.transform.localPosition.y, 0);
//Apply the offset according to its transform up vector to account for rotations
Vector3 offset = -this.transform.up * this.transform.localScale.y;
obj.SetLocalPosition(this.transform.localPosition + offset);
}

Expand Down