Quantcast
Channel: Questions in topic: "parenting"
Browsing all 302 articles
Browse latest View live
↧

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 Article


setParent 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 Article


Parenting 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 Article

How 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 Article

Instantiating 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 Article


Jittery 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 Article

Problem 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 Article

Elevator 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 Article


Destroy 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 Article


How 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 Article

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 Article

Object 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 Article

parent 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 Article


How 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 Article

Set 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 Article


How 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 Article

Joints 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 Article


SetParent 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 Article

Beginner 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 Article

Matching 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
Browsing all 302 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>