Bug floating object when fixed to bones
Hi, I am having a problem fixing for example an axe to the hand bone in unity. I parented the axe to the bone transform but when i play the axe slowly starts moving away from the player it literally...
View ArticleObject starts floating after being fixed to bones
Hi, I am having a problem fixing for example an axe to the hand bone in unity. I parented the axe to the bone transform but when i play the axe slowly starts moving away from the player it literally...
View Articleparent and set localpositions and rotation from gameobjects to a specific...
I have a player(Tiger) and enemies, other animals. What i want to do is when the player kills the enemy that he can grab the enemies neck in his mouth and drag him with him. So the localposition of the...
View ArticleHow can I access object's children from other object?
Hi! I'm quite new to coding so maybe its a dumb question but I have a problem accessing child in different object than the one with the script. I have something like this: public class...
View ArticleSet child position and move parents with
Hello, I'm creating a game and I have a problem. I have a gameObject with a rigidbody and some script. This gameObject has 2 child and each child has a collider (trigger). In a script I need to set the...
View ArticleHow to flip objects that are currently rotating?
In [this gif][1], what I want is for the arms and bow to flip when the player is flipped, so it doesn't look like they are upside down. I have tried making the arms a child of a parent, and then...
View ArticleJoints in child objects.
Hi all, I've created a GameObject which contains my rigid body. Then, I created my GameObject which is to be my joint. I had to instantiate these separately for reasons I won't get into here. In other...
View ArticleSetParent with worldpositionstays = false not working?
Hello there. I'm trying to change a ui object's parent using SetParent(). As other answers on the site have suggested, I'm setting the worldPositionStays parameter to false. Using both false and true,...
View ArticleBeginner question about 'SetParent'; Why is it necessary to make the script...
Hi! ---First of all there is no problems with the script and my game will run--- I've got some "past" experience in Unity and I'm quite familiar with the basics on coding in C#. Currently I'm learning...
View ArticleMatching axis?
I made one ball child to another but when main one moves axis of another dont change. It follows it but doesn't completely mimicate it. How can I do this?
View ArticleHow to fix components turn off when unparenting an object?
I am having weird behavior in my game where whenever I unparent a child, all of the child's components are turned off. I am trying to unparent the child just before destroying the parent. Any help with...
View ArticleUI text not showing in my scrollView
I have a scrollview, that i am trying to display a piece of text inside. When the following code i get an object with a text component. It has the content as parent, but it doesnt appear when i run the...
View ArticleHaving problems when trying to grab an object
Well, I've been trying to create a simples first game, and then try to build on top of it adding more machanics as I see myself interested, and the initial premise is to grab an object (a sphere) with...
View ArticleHaving Problems grabbing an object
I've tried other solutions, but they did not work, so i tried to use raycasts, and they kindda worked out, the problem im having right now is tht when my character goes from left to right (from 1 to -1...
View ArticleHow does Transform.SetParent() worldPositionStays work with null parent?
Hi there, I have trouble understanding how `Transform.SetParent()`'s `worldPositionStays` parameter works, specifically when parent is set to `null`. The scripting reference says:> If true, the...
View ArticleCreating text at the position of the gameobjects in world
HI all! I am trying to have a text displaying over the enemies and player. The code as it is will just display it on top, but for testing purpose it doesnt matter. Code: public class ShowHealthText :...
View ArticleGet arrows to stick into things that move.
I have a nice little bow and arrow system that sticks into things. But when i shoot an object that moves the arrow stays put, but the movable object moves, leaving the arrow behind. I would like to...
View ArticleTrying to set the parent of an instantiated object to another instantiated...
I know how crazy this sounds, but is it even possible? I have a instantiated object called wordClone which I want to set parent to another instantiated object called wordObj. To explain further I will...
View ArticleMove and Rotate object with "Parent" without Parenting
Hello, i want to "grab" a object and it should then follow the "hand" and behave like a object which is parented. The position and rotation should updated in the exact same way as it would do when the...
View ArticleRotation problem in contructing arm with parent / child reloation (forearm...
I am constructing a simple avatar using cubes. an arm is constructed by 2 cubes, in this parent-child manner:> arm> - forearm I am using some other controller to control each rotation by given...
View Article