Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Spine 2D and Unity Weird Light Issue

Discussion in '2D' started by shoother, Mar 3, 2018.

  1. shoother

    shoother

    Joined:
    Jul 18, 2016
    Posts:
    4
    While using spine in unity 2D with a spot light, the light from the spot light will shine on the character if he's facing right but only when the light is in front (in the Z direction) of the character. If the character turns left the light will not have any affect. But, if you turn left and move the light behind (in the Z direction) of the character, then the light will shine on the character. I'm using the Spine/Skeleton Lit or Spine/SkeletonGraphic material with spine 3.6 runtime. I've tried adjusting the alpha and other random settings, but im not sure where to begin.

    The Z direction of the character doesn't change when turning left or right in unity, but the spot light only affects in a certain direction.

    Any help would be greatly appreciated.
     
  2. shoother

    shoother

    Joined:
    Jul 18, 2016
    Posts:
    4
    The environmental light affects the character, but the spot light only affects the character based on the rotation. I want the spot light to affect the character regardless of their X scale or rotation. Culling is off....
     
  3. shoother

    shoother

    Joined:
    Jul 18, 2016
    Posts:
    4
    "When you've been working on a problem for 1 hour, ask a question on a forum, and then solve your problem 3 minutes after asking the question" = SMH.

    The problem is that im rotating my character 180 directions when facing left. Therefore, the normals are away from the spot light. I solved the problem by changing the X scale from 1 to -1. This will allow the light to affect the character while facing left or right.
     
    AcidArrow likes this.