- Home /
VRTK Archery - How to use bow and arrow with VRTK
Hello everyone!
If you're on the VRTK Discord channel you've probably already seen my question but apparently no one knows the answer to my questions so I'm asking again on this forum.
I'm using Unity 2019.4.9 with the VRTK 3.3 plugin and SteamVR. The scene that uses a basic bow and arrow to shoot at objects is here: Assets\VRTK\LegacyExampleFiles\023_Controller_ChildOfControllerOnGrab.unity
All I want to do is replace the animated bow and arrow from that scene with ones that I got from the Unity Asset Store. The arrow works fine but I'm having trouble replacing the bow so that the animation of pulling the string gets played. I feel like I'm really close (the arrow already snaps into place) but can't get the animation to work.
These are the errors that I'm getting:
NullReferenceException: Object reference not set to an instance of an object VRTK.Examples.Archery.BowAnimation.SetFrame (System.Single frame) (at Assets/VRTK/LegacyExampleFiles/ExampleResources/Scripts/Archery/BowAnimation.cs:11) VRTK.Examples.Archery.BowAim.PullString () (at Assets/VRTK/LegacyExampleFiles/ExampleResources/Scripts/Archery/BowAim.cs:174) VRTK.Examples.Archery.BowAim.Update () (at Assets/VRTK/LegacyExampleFiles/ExampleResources/Scripts/Archery/BowAim.cs:98)
So obviously there's something wrong with the animation but I can't figure out what. If anyone has experience with this or is willing to look at my project - please let me know!
Your answer
Follow this Question
Related Questions
Problems with an animation 0 Answers
Animation not playing? 0 Answers
[VR][HTC Vive][The Lab][locomotion] How to implement the instant move 1 Answer
Steam VR touchpad to rotate object 1 Answer
SteamVR 1.2.2 Update poses deprecated 2 Answers