How to Change Parenting while in game? C#
I need to be able to change the parent of an object in a blender character model while in game. For now I have two models, one with it bound to the hand and one where it's bound to the back. I'm trying...
View ArticleParenting rigidbody via script acts differently than via editor?
I have a ship made up of : a) Ship drive central rigidbody with single collider that handles user input and buoyancy/gravity of ship(top level parent/root). b) Hull and barrel cages made from compound...
View ArticleLogic Question with position and parenting
Hello, I'm trying to move a child object of a "room" to be on one of the four walls of the room. The problem I'm having seems to be with the fact that the parent, or room, is scaled to fit a specific...
View ArticleStrange Relationship Between Armature and Mesh Rendering Game Object
Hello Unity community. The last time I asked this question, I received no answers at all, but since then I've done some investigating and have come up with a couple new useful pieces of information....
View ArticleParenting World Space Particle to a Bone
When I attach a particle that uses world space to one of my character's bones, it has an offset on the Y. If I change the particle to use local space, this offset goes away. Why does parenting to a...
View ArticleDragging Enemies C#
I'm having some trouble coding a script that drags the enemies to different positions (it would follow the player). using UnityEngine; using System.Collections;...
View ArticlePhysics.Raycast lagging behind
I am making a game where players can be onboard fast moving ships. These ships have controls in the form of panels and I use raycasting to find out which one, if any, the player is currently aiming at....
View ArticleParent Multiple Clones to a New Parent?
I need to parent a series of cloned gameobjects tagged as "monarch" to a single gameobject tagged as "control". The script/s that instantiates them are written in UnityScript and too complicated for my...
View ArticleNetwork.Instantiate parenting on other clients
Hi all, I need help to parenting an object instantiaded via Networking I've an object called SpellGenerator attached to players. When i press a button i would like to cast a spell that play a particle...
View ArticleGUITextures and ClickEvent
Hey, I have GameObject which has ***GUITexture Component*** attached onto it. Now this gameobject have GUITexture child. I know how to detect *MouseClick* on a Parent but how to also detect MouseClick...
View ArticleParenting not working with massive force to rigidbody. Does having rigidbody...
Ok, so I have 3 objects a, b and c. a is a character, b is a hinge for a weapon and c is a weapon. c is a child of b and b is a child of a. When c hits the environment a massive force is applied to a's...
View ArticleStrange movement artifacts when rotating children around parent object
Gif demonstrating the problem: http://i.imgur.com/8lHwFVD.gif Object hierarchy: http://i.imgur.com/ZlpuFX4.jpg Script attached to gun object:...
View ArticleAlternative parenting method in editor? (no scripting)
I know that I can parent an object by dragging it under its parent in the Hierarchy. But this isn't terribly convenient when the scene is large and the hierarchy is complex. In some cases alternative...
View ArticleOnTriggerEnter() parenting problem.
I've got a Player object and a Weapon object on the scene, and I want the weapon to become attached to `Player` when the player touches the `Weapon`. void OnTriggerEnter2D(Collider2D other) {...
View ArticleAnimation plays in wrong position
Hi, I created an animation in Unity, moving a character around a scene with some static background objects and it all worked beautifully. I then created an empty game object and moved everything in my...
View ArticleError : Transform.parent not working properly.
I have a script attached to my "Land" GameObject which spawn obstacles at different random co-ordinates, this is the main script. var cube : GameObject; function Start () { var newCube =...
View ArticleColliders2D not working under same parent?
During the development I have found strange Collider2D behavior in Unity 4.6.0f1 (not sure if it is a 4.6 issue?). To reproduce a problem I created a separate project and very simple scene with 3...
View ArticleGameObject Disappears when Setting Parent
I have a sprite game object. Whenever I set its parent to a programmatically sprite it will no longer render. When the game is paused, I can see the sprites transform controls in the scene but can not...
View ArticleSmooth enter circular orbit
Hi, I have a problem with a scenario where a moving object should enter a circular orbit around another object. The Parent object has a orbit line object where the player will get parented since it...
View ArticleHow to make an object follow another object on a keypress?
Hi everyone! Im sorta new to coding outside of visual scripting methods, but I was wanting to make a short little test game in unity where I moved a block over on top of another block and hit the...
View Article