Hey guys, I was wondering on how to make a light be attached to an object, so basically what I know has to happen is I have to get an object, and get the Vector3 location of it, and set that to the light, but I don’t know how to do that, any help guys?
Thanks in advance and for helping me so much already guys!
you create a light in the scene, then drag it on to your game object. this is SUPER basic stuff. I suggest you do some tutorials in the learn section at the top.
That’s not what i meant, I meant to like have it stick to an object, like a headlight in a car game or such. I want it to track with the balls and paddle in a pong game I’m making (nice to start simple right?).
@LightWell as JamesLeeNZ stated, by dragging the light on to the “ball” you refer to as the headlight, you parent it’s transform to the ball transform. When you rotate the ball transform, or move it, the light will follow it. I think you should do some reading on Transforms in Unity, a google search such as “Unity3D Transform” yields good results.