Quantcast
Browsing all 302 articles
Browse latest View live

Missile Won't Attach as a Child of an Airplane. Why?

I have an airplane model that I want to attach a missile to. In the hierarchy, I have an airplane object with the motion script attached, and children to this are: * the airplane model hierarchy * a...

View Article


Moving gameobject to Sibling's child ("Niece?").,Moving Gameobject into...

Basically, I want to move "Arcane Circle" into "Controller (left)" OnTriggerEnter, preferably in c#. I feel like I've tried everything at this point, and nothing has worked. I've milked Google dry and...

View Article


Unity 3D : Objects that were parented under empty object are changing their...

I was have a problem with my pivot point of game object so I used this [solution][1]. Creating new empty object then setting it position to the position I want then parented it to my objects. Then...

View Article

Auto-Destroying obstacles in an endless runner

Hello Everyone I am currently busy with an endless runner. I have a base "Tunnel" prefab to prevent the user from falling off the map. This is then instantiated every time an object with tag X enters...

View Article

Why is transform.parent not working in Unity 5.5.4?

Can anyone please tell me what's wrong in my code. I have spent last 3 hours searching for the issue. It seems like it works for everyone but me. public class FollowYou : MonoBehaviour { GameObject...

View Article


How do I spawn something if I'm touching something else in an array of children?

I have an array of game objects (with circle colliders set to triggers) positioned equidistant from each other in a circle pattern. A player object will move in the direction of the circle pattern...

View Article

how to arrangement child objects using c#

i have a gameobject that have a group of plane meshes that created randomly as child every one of this planes have a "2f" offset in x axis between every plane what i wanna do is i wanna make the parent...

View Article

Rotate Parent using Child as Pivot

I am trying to write a script that allow me to rotate an object, treating a dynamically moving child as the pivot. This is to allow the parent to rotate, while allowing the child to feel as though the...

View Article


How to make multiple gameobjects child of one and the same transform (SCRIPT)

So I made a building system in my game and all the blocks I can place are tagged with the tag "Block". So and now I want that every placed block should be a child of the same transform. So I mean when...

View Article


Foreach loop not going through all elements

Hello! I am having an issue with this piece of code: foreach (Transform child in transform) { if (child.tag == "Grass") { child.transform.parent = grassList.transform; } if (child.tag == "Swamp") {...

View Article

Problem combining transform.rotation and hierarchical rotations

Hi, I try to implement a forward kinematics system to transfer absolute joint positions of a skeleton to joint rotations and to rotate the whole skeleton in the scene. I already transferred the...

View Article

setting parent as object warps the child object

I have two cubes, cube1 and cube2. Both cubes are the same size initially. cube1's transform Rotation is 0,45,0 and Scale is 1,1,0.3. cube2's transform Rotation is 0,0,0 and Scale is 1,1,1. If I make...

View Article

Is there a way of correctly parenting to get scales and positions of...

Originally, I was doing this: void Update () { this.transform.position = new Vector3 (previousObject.transform.position.x + prevRend.bounds.size.x / 2 + rend.bounds.size.x / 2,...

View Article


Child objects shifts parent's origin,origin changes to center of mesh

I want to add a weapon, attached to the bone of a model (made in Blender), but Unity does always change the origin of a parent-child to the center of the mesh of the child (as bone doeasn't have any...

View Article

Mesh gets squashed after parenting to camera.

So I'm trying to make an FPS and it was going well until I came across this problem (in the title). It basically squashes down flat when I parent it to stuff. the gun is a prefab with meshes parented...

View Article


Why game crashes on android build when using SetParent with...

Hi, after hours of debugging my android build I just discovered that the problem was here:`Block block = Instantiate(blockPrefab, transform.position, Quaternion.identity);...

View Article

Character controller not following moving parent transform properly

In the latest version of unity, something about the character controller has changed. In previous versions from mid 2018 I could have a character controller parent to an object and move along. I could...

View Article


VRChat Scaling when parenting

Hello I have a serious problem with the parenting in unity that has been plaguing me from the start. when I attach something to anything other than the wrist it's fine. but as soon as I try and attach...

View Article

Trying to understand parenting

Hi all, I'm still trying to wrap my head around parenting a game object. I have a player object with a nested game object ( `gunContainer` )that has an animation I trigger on certain key inputs. When a...

View Article

Trouble with parent objects and colliders

I have a code that lets me move objects by dragging with the mouse, I want to be able to change the position of the root parent but it doesn´t seem to work This script is assigned to a child object in...

View Article
Browsing all 302 articles
Browse latest View live