- Home /
OnTriggerEnter triggers twice when changing the parent of a gameObject inside of a collider.
I've noticed that when I change a gameObject's parent inside of an isTrigger collider it triggers the OnTriggerEnter function again. Is there possibly some option to change this? Or possibly some way to mimic the behavior of a child object without actually parenting it to another object, (but still allowing it to move like a rigidbody parented to a gameObject)?
The gif below shows you what kind of behavior I'm looking for. Notice how the red ball has a rigidbody and is parented to the cube but still has its position updated by the cube in various ways. I'm looking to do this without actually parenting the red ball.
Your answer
Follow this Question
Related Questions
Launching a player in a certain direction - C# 1 Answer
" You should never have a parent and child rigidbody together " ? 2 Answers
Is it possible to combine child trigger of a object to only trigger OnTriggerEnter once? 1 Answer
Physics simulation problem 0 Answers
Rigidbody.AddExplosionForce() Not Playing Nice With Trigger Colliders 1 Answer