Search Unity

Is there anyone that can do me a favor?

Discussion in 'Scripting' started by Slaghton, Aug 20, 2014.

  1. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    FIXED: DISREGARD
    Hi, I work in blender and export all my rigged characters from it and for the longest time i've tried to get a mouse look script on my chars spine so that when I look up or down the character bends back/forth. I've managed this on models that say, been exported from 3ds max but when I export from blender and apply a simple mouse look script, instead of the character bending backwards and forwards, the spine bends side to side. The same things happens if I take a char that it did work with and import and export out of blender. So its something with blender and i've tried about everything (rotating skeleton, applying rotations, changing export settings, etc)

    I figured I would just have to swap out x and y rotations and stuff on the script but the closest I got was the character bending back and forth in a diagonal direction. The rig and animations work perfectly fine though.

    So, I came here asking if anyone could take a look at my 3d model inside the unity editor (its the first one I made so its not the greatest :p) and attempt to get a proper bend rotation on the spine? I have some ok experience in scripting but there's things im still learning all the time so I might just be overlooking something.

    (p.s., I didn't want to beg for help hence why I put this off for months but im making more progress in my project and concentrating on combat now)
     
    Last edited: Aug 21, 2014
  2. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
    Sure bud, send me a download link to your character. :'P
     
  3. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    Sent you a pm Magiichan!
     
  4. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Well, your problem is the fact that Blender's coordinate system is X-forward, Z-up. Unity's is Z-forward, Y-up, so basically, try spinning the bone on the z axis instead! If that doesn't work, try them all: one of them will work, unless your bone is weirdly deformed... ;)
     
  5. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    See, that's what I thought! I took that spine bone and i turned it every which and applied the rotation not to long ago for another attempt but it just doesn't want to cooperate ><. I just made another rig for a minion monster so I can try everything again on him in the editor. If it works then i'll have to change the other rig around but I get the feeling its not going to work on this one either :|.

    EDIT: Arg, I don't get it. The spine bone in my model has the same rotation as the model that it works correctly in but my model bends differently.
     
    Last edited: Aug 21, 2014
  6. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    FIXED:
    Alright this is worthy of a bump. OMG, I am so dumb LOL. I was always rotating it on every axis EXCEPT the one I needed. That bone roll was set to -180 so i changed it to -90 and bam my model is bending back and forth correctly. *epic facepalm*

    I realized I never got it to work because I had blender set the bone roll automatically to either x,y,z. I manually inputted the bone roll this time to the appropriate number and that got it to work
     
    Last edited: Aug 21, 2014
    Magiichan likes this.
  7. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Slaghton:
    LLLLLOOOOOOLLLLLL!!!! :D :) :eek: :p
    This would have to be the BIGGEST pain in the- oh look, a rainbow unicorn!- I know in blender! I got this problem when rigging the face of one of my characters, and wondered why the jawbone was moving strangely... :D