How 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 ArticleProblem with rotations for moving between one rotating object to the other [C#]
Hello, I’ve been struggling with a problem recently. I’m making a game that is mainly about jumping from one rotating circular object to the other. The problem is the rotation. I want the player to fly...
View ArticleHow to get parent with component on collision?
I have a game object (A) with several child objects (Ab, Ad), which is also child of another game object (B). Any of those can get collision (A, Ab, Ad), but I need only to get parent's (game object A)...
View ArticleObject changes position/rotation, when moved (in/out of parent) in the...
Hey, when I move my object up a level in my heirarchy, it's position changes. when I move it back into it's previous parent, the position resets to the correct state. This is happening wether I'm in...
View ArticleA moving player on a moving ship...how to move the player around without...
I want to be able to move a player around on the deck of a ship using the WASD keys. At the same time, I want to be able to move the ship using the arrow keys. The problem is that when I move the ship,...
View ArticlePrefab Particle gets destroyed because its parent gets destroyed, how do I...
Well, I have a problem. I have written a script that shoots spheres in the direction that I'm looking and at least that works lmao And this sphere gets deleted after 5 seconds to avoid lagging, but I...
View ArticleIs 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: >...
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 Article