- Home /
The script does not work the same as it works for the head(main)
Hi! I have this problem, where the head (main player if we can say so) has a script for gravity and etc. but I can't use the same script for the prefabs when the player eats a sphere ( the game is kind of a classic snake games, except the fact that is on a sphere (Earth) with gravity around the earth). On the head all the commands works well, but on the bodyParts (prefabs) doesn't. In the pictures, you can see that the bodyPards are falling through the planet, instead of following the head on the same road where the head goes. alt text
Here are the Screenshoots from the Script too, that makes the player and bodyparts to move, if helps on this problem (i can copy-paste it here if you need a part of it to modify). Thanks for help! :)
Answer by AnonymousForest · Mar 25, 2021 at 12:38 AM
I am not a pro but it doesn't look like the body parts are children of the head. They are just children of the parent. So maybe try moving them or instantiating them under the "head" object instead of under the "player" object
Unfortunately I tried that way but it didn't work :/
Your answer
Follow this Question
Related Questions
Rigidbody with FreezeRotation on x,y,z enabled still rotates whenever in contact with colliders 0 Answers
How to add gravity without a rigidbody 2 Answers
3d Gravitate Only when player is near?(No Gravitate from afar) 1 Answer
A position locked hinge joint with drag and no gravity? 1 Answer
How can I drag an object with touch on X and Z axis without disrupting the gravity of the rigidbody? 0 Answers