Is it possible to reparent an object to the root of a scene?
I have an object currently parented by another object. Can I move it using a c# script so that it has no parent in the scene?
View ArticlesetParent method not working
So I have a User Interface panel that when I grab, I am able to move, and then when I release it, I want to parent it to a suit that is parented to my left controller. Right now, when I release, the...
View ArticleParenting a GameObject with script not working (C#)
So, I'm trying to make a system where I can swap between playable characters by pressing a button, and parenting them to a GameObject with the Player Controller. However, the character object will not...
View ArticleHow to parent the state of a component with another one
Hi everyone, how can I parent a component check box to another one in the same game object? When the parent *(a mesh renderer)* turns on *(due to trackable AR found)*, the child would turn on *(it's a...
View ArticleInstantiating child as parent not working : Object Pooling
I am making an endless runner game, and I am trying to use Object Pooling. When I try to set the transform of the child to the transform of the parent, it gives me an error:> NullReferenceException:...
View ArticleJittery world around stationary character
**Summary:** I am creating an infinite runner. I have an object in my scene that is permanently moving to the left ("Scroller"). Whenever I create obstacles, I parent them to the "Scroller". Once they...
View ArticleProblem with Active/Inactive Baked Lights
I really had no idea what to title this, because I am completely mystified by what is happening here. Basically, I am making a game with a progress system. When a scene is loaded, if a variable for a...
View ArticleElevator that parents player to itself causes jittery motion.
I have an elevator that moves using transform.Translate(). It had a problem where when going down, the player would fall towards the elevator, stop and then the elevator would outrun the player again...
View ArticleDestroy one child (of same instance) after another?
Hey, so the way my game works right now is that due to a certain event, a bunch of "Point"-objects spawn, and they instantly attach themselves to a "Target"-object as children. The Target has a...
View ArticleHow do I make a object be parented to another object using a trigger.
I have two objects. Object 1 and Object 2. Object 1 is the player and is in front of Object 2. Object 1 can move forward. Object 1 is the main parent. Object 2 is behind Object 1. It is not a child of...
View ArticleBug 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 Article