Hey Yall, I’m a few months into the Unity3d scripting but I could definitely use some help with some of the movement scripts.
What I’m trying to do:
I’m trying to rotate Harry Potter’s wand in his hand. When he’s in a dark room the end of the wand lights up. I want his wand to rotate at the end that harry’s hand touches so that he can move the light around in the dark.
What I’m using:
I’ve attached a MouseLook script to the wand.
Problem:
The wand rotates around the end of the lighted end instead of rotating around where Harry’s hand is. Therefore, instead of the lighted tip pointing at the mouse’s position, the handle moves around, opposite to the given mouse coordinates.
Although I have tried moving the wand in different locations, the point that it rotates around stays the same.
Questions:
How do I change the orientation of the mouse look script to rotate around the handle’s axis?
or:
What is the best way to make Harry’s wand operate correctly.