- Home /
Instantiated child doesn't move along with the parent in case of low frame rates
Hi all,
well I have a very, very strange problem lately. I have my main object (submarine) which has a joint where I attach an instantiated torpedo prefab to it. So far so good. The submarine itself is a rigid body as well as the torpedo. I have some buoyancy for the submarine and the torpedo as a child should move together with the sub.
Actually it does for normal frame rates around 60 fps but when the frame rate drops to, let's say below 15 the torpedo doesn't move synchronized with the sub anymore. I guess this must have something to do with the physics involved?
I've made two videos to show the effect:
Full framerate and normal behavior: http://youtu.be/PCVr6amnP7s
Low framerate: http://youtu.be/MJFldImusvA
I have absolutely NO clue what's going on here... Thanks for your help!
Is the torpedo itself affected by buoyancy? $$anonymous$$aybe give it a rigidbody (the torpedo) and set it to is$$anonymous$$inematic? This is strange... but I'm curious, why is your game dipping to 15fps if not on purpose?
Thanks, actually I already resolved it by just removing the rigid body from the torpedo as I work around with a static speed for it and no forces. The game itself runs smoothly but I usually do stress tests as this will be a mobile game, so it might slow down on older devices. ;)
I'll try that kinematic thing, too!
Your answer
Follow this Question
Related Questions
Instantiate as children of GameObject hit by raycast. 2 Answers
Prefab, procedural attachment of child, childCount return 0 1 Answer
Rigidbodies violently repel when replacing with pre-shattered opject 2 Answers
prefab question 1 Answer
instantiated GameObject Prefab jumps in air after instantiate 1 Answer