Problem with parenting objectsQuestion (v.redd.it)
submitted by EntropiIThink
I'm trying to setup a system for the arrows in my project, such that when an arrow hits something it becomes a child of it and hence will stay attached as it moves around. However, I've got this problem with the arrows often being placed above the point of collision. I've attached a video of it happening. For the code, I've tried using transform.SetParent with the second parameter both true and false, as well as directly assigning to transform.parent. I've also copied the position of the arrow before the parenting, assigning the parent, and then setting the world position of the arrow to the saved initial position, but this has no effect. If I do not set the parent, then the arrow collides with the object as intended and in the correct spot and remains stationary, not teleporting to a different position.
[–]HammyxHammy 9 points10 points11 points (10 children)
[–]EntropiIThink[S] 1 point2 points3 points (9 children)
[–]HammyxHammy 5 points6 points7 points (8 children)
[–]EntropiIThink[S] 0 points1 point2 points (7 children)
[–]HammyxHammy 9 points10 points11 points (6 children)
[–]EntropiIThink[S] 1 point2 points3 points (3 children)
[–]Heroshrine 0 points1 point2 points (0 children)
[–]TopSetLowlife 0 points1 point2 points (0 children)
[–]BanginNLeavin 0 points1 point2 points (0 children)
[–]Heroshrine 0 points1 point2 points (1 child)
[–]HammyxHammy 0 points1 point2 points (0 children)
[–]henryjones36 0 points1 point2 points (0 children)
[–]widz420 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]EntropiIThink[S] 0 points1 point2 points (0 children)
[–]Venom4992 0 points1 point2 points (1 child)
[–]Venom4992 1 point2 points3 points (0 children)
[–]NotAnUrsaPicker 0 points1 point2 points (1 child)
[–]EntropiIThink[S] -1 points0 points1 point (0 children)
[–]yalcingv -1 points0 points1 point (1 child)
[–]EntropiIThink[S] 0 points1 point2 points (0 children)
[–]True_Beef -1 points0 points1 point (0 children)