VRwithAndrew / XR-BowAndArrowUpdate

Template project for Updated Bow And Arrow video.
https://youtu.be/H0xTz4JtWiI
Apache License 2.0
25 stars 14 forks source link

StringRenderer gets no update #1

Open Dennsen opened 3 years ago

Dennsen commented 3 years ago

Hi Andrew,

thanks for doing this, it's a nice start for me doing stuff in Unity and VR! I think I found a small bug. I'm using Unity 2020.3.9f1 with XR Interaction Toolit 1.0.0.-pre.4.

The StringRenderer get no update for the middle-transform. I think something like

private void UpdateColor(Vector3 pullPosition, float pullAmount)
{
    **middle.position = pullPosition;**
    // Using the gradient, show pull value via the string color
    Color color = pullColor.Evaluate(pullAmount);
    lineRenderer.material.color = color;
}

has to be added. Then the string moves, but the arrow does not go off. It just sticks after releasing the trigger.

Regards

guilhermeborgesbastos commented 2 years ago

I have the very same issue on Unity 2020.3.26f1 with XR Interaction Toolkit 2.0.0.