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

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 Article


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


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

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

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


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

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: >...

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


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

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


Setting 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 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


Changing 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 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

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


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