Unity3d character body length -
i having trouble using unity3d (js). add gameobjects behind character (a bit snake game guess). dont know how set different position each time. ps: character in constant movemement. here script:
var lenght : int = 0; var lenghtcharacter: rigidbody; var character:rigidbody; function addlenght(amount : int) { lenght += amount; (var i=0; <= lenght; i++) { var onelenght = instantiate( lenghtcharacter, character.transform.position - character.transform.forward * (0.3 * i), character.transform.rotation); } }
i call function when character collides 'asteroid' =]
thanks help.
a springjoint perfect component fluidly achieve exact functionality describing: http://unity3d.com/support/documentation/components/class-springjoint.html
Comments
Post a Comment