Search Unity

Question Making a charachter respawn

Discussion in 'Scripting' started by claudiok, Sep 27, 2022.

  1. claudiok

    claudiok

    Joined:
    Aug 16, 2022
    Posts:
    18
    I've made a charachter with Blender and i import it with fbx format.
    I try to make my charachter respawn and it doesn t work.
    I try it with another thing and it works how could be this posible?
    I have to add that my charachter inspector says that is formed by a lot things. I think that this is the problem , because all other things apper as 1 one thing on Inspector and with them works my spawn point.

    My code for spawn point is
    Personaje.transform.position = Spawn2.transform.position;

    Personaje is chachter that i'm trying to make it respawn , and the charachter has been exported with .fbx format
     
  2. mopthrow

    mopthrow

    Joined:
    May 8, 2020
    Posts:
    348
    Check if there are problems with your mesh by dragging and dropping the fbx in to the scene. Does it show ok?

    If it shows up ok, then it's probably something to do with your code rather than your mesh.

    Can you post your whole spawn code script? (And use forum code button when posting).

    Even if your character has lots of meshes and submeshes, it should still spawn ok.

    Do you get any errors when you try and spawn your character via code? If so, post those too :)
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    Check how big it is (scale in import).

    Sometimes it will come in 100X too big or 100X too small and then you cannot see it.

    Then try make a cube in Blender, export the cube, bring it in.

    etc.