Top down object pickup
Okay, so problem is as follows: I have my player object which is set up in a top down manner, controlled by arrow keys and the graphical part(currently just a box) rotated by looking towards the mouse....
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 ArticleOnly last placed grabbable object is working properly
I'm not sure what I am doing wrong, but it seems only the last object placed is working properly. using System.Collections; using System.Collections.Generic; using UnityEngine; public class...
View ArticleSetParent() unparenting its children
I instantiated a 2D map tile using a 2D int array. Then I proceeded to to parent each tile I created just to make easier to work with in the Hierarchy viewer like this: foreach( GameObject go in...
View ArticleSetting the parent of a transform which resides in a prefab is disabled to...
I am having an issue trying to set the parent of an object. (Using Unity 5.5.4p4) The error is: Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption So i...
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 ArticleChanging parent after deactivation error?
For my resource management, I'm trying to return my resources to a parent object upon deactivation, like so: void OnDisable() { transform.SetParent(obj.transform); } Everything seems to run as...
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 ArticleError with parenting spawned weapon on client side
Hi guys! After week "having fun" with parenting I gave up. So my game is TPS, where i have two weapons: rifle and pistol. In game player will have option to change it. On the host side everything works...
View Article