How do I disable ONLY the component of a child object and not the parent?
I have a puzzle piece that I move by dragging with the mouse Th puzzle piece is made of a parente gameObject witha collider2D an other things(collider used for dragging) and two, three or four child...
View ArticlePlayer position relative to rotating platform [gif included]
So Im working with a character that can jump to a platform that rotates around itself. The problem is, when he jumps to it he's left behind by the platform and just falls down. Im trying to make it so...
View ArticleParticle offset on parent.transform
I grab an object colliders[0] by parenting it to a snapPoint on my handobject. The grabbed object colliders[0], then child of the snapPoint.transform, will start a ParticleSystem component, triggered...
View ArticleCinemachine movement glitch when player is unparented from a moving platform
I'm making a 2d platformer, I'm using cinemachine to make the camera follow the player. I have moving platforms in the game, when the player is on one, he is parented to the platform (so that he moves...
View ArticleUI.Button won't parent to canvas.
Hi, I have the following code that successfully instantiates a prefab button object. I see the button pop up in the scene-hierachy, but it's way outside the ui canvas coords and it is NOT parented to...
View ArticleParenting ethans hand to a gameobject
I have parented ethans hand to an object, a spray can. It seems to make ethan crouch and then slide. The object is picked up when ethan collides with it parenting code other.gameObject.transform.parent...
View ArticleMoving child transform also moves parent rigidbody
In this situation we have the parent gameobject which posses the rigidbody and is basically an empty gameobject otherwise then we have the child which is suppose to be a spinning top my script rotates...
View ArticleKinematic forces under Rigidbody Parents
The goal is to have a sub body that is part of a rigidbody parent, which can push other objects through its local movement. Like a piston. Moving the collider group of the parent body through the...
View ArticleGameObject with multiple collider2D,
In my game there are obstacles falling from the top of the screen at different speeds. Obstacles have physics and i'd like to have them interact with eachother (obstacles pushing other obstacles). The...
View Articlehow to parenting gameobject to UI element without crashing android device
Hi, i try to instantiate a gameObject in my UI. the gameobject has a transform and the target object has a rectTransform but In using this line of code: borderMap = Instantiate(bordureGrp,...
View ArticleIs Physics.SyncTransforms() automatically called in built game?
I have a weird game behavior: - in built game player is perfectly parented to a moving platform and keeps the position relative to the platform pretty smooth. - in play mode the behavior is completely...
View ArticleMy weapon holder goes behind the camera on Play
So I made a couple of weapon models, each containing a few animations (animations were made in Blender). Then I imported them into Unity, put them in an empty object and made them functional...
View ArticleObject not following parent position when parent rotation is locked,Unable to...
Hello, I've been trying to build a 'pull heavy object' mechanic for my player. The mechanic worked great by parenting the box object to my player when pull was set to true (indicated by a raycast and...
View ArticleAdressing a Child Object after it´s unparented
Hey, I have a big ship in my space shooter game which is used as a hub to spawn smaller ship. The small ships are instantiated in the as a child object and are released from the parent ship after 10...
View ArticlePiling up objects and transporting them
Hello Everyone, I'm trying to work on a mechanic where the player is holding a box and they need to catch and pile pizzas that randomly fall from the sky. In order to make this work I have been trying...
View ArticleHow can I aim with a laser sight attached to a gun on animated character?
Hello. I am using the Mocap Online Pistol Animations. I have a pistol model parented to the right hand of the character. I also have a "laser sight"(line renderer) attached to the tip of the pistol....
View ArticleWorldPositionStays true not working
character.transform.SetParent(transform, true); This piece of code runs in a moving platform. On collision it should set the character's parent and keep the character's original position, scale and...
View ArticleParenting instantiated particle system
Hi everyone - I have a particle system that is instantiated when another object collides with it - however I want it to move with the parent it is a child to. This is the current code I have, but it...
View Articlelocal space position and world space position do not in code match a game...
well I had a game object (a) the child of game object (b) and in code i simply set it's parent to null but after this (a) game object position and rotation does not change which means it travels to...
View ArticleWhy Deparenting The First Child Changes Position of The Parent
I have three balls attached to a parent. When they hit an obstacle, I destroy the balls. However, when the first child of the parent is destroyed, the parent's position changes - its y value changes....
View Article