#Click the gameobject in the hierarchy

1 messages · Page 1 of 1 (latest)

jolly ravine
sly marsh
#

Can you show the hierarchy too?

jolly ravine
#

sure 1 sec

#

the reason there's so many children is bc i change player "bodies" so they can be rocket, steamroller, etc. that way i can get some collider division easier as well as some other conveniences for the script... honestly i have always found the children collision stuff a bit fiddly

#

come to think of it that's the other reason for a player offset. i either have to set the player a bit above of the children a bit below. i chose to put tthe children below, but the tilemap also registers above so i have to put a collider and the script on the children or else the children objects just inherit the triggers from the parent

#

i'm sure there's a better way lol

#

sorry to complicate things i just want to be verbose up front so i don't waste your time

sly marsh
#

Yeah that's good, no worries.

#

The point is that the rocket pivot needs to be at the same place as the PlayerFish pivot. Can you select the rocket and show the same screenshot? The local position in the top right need to be 0, 0, 0 for this to work.

#

Otherwise you can not use this style of coding.

jolly ravine
#

top right of what, the prefab local ... um not sure how to ask this

#

like in the prefab?

sly marsh
jolly ravine
#

how can i make the rocket pivot be in the same place if they're in different coordinates though?

#

k 1 sec

#

ah i see it now. would the best way to do this just be to put them all on top of each other then just move the player up or down or whatever when they change body types to accomodate for differeent sizes?

#

i will do some testing. like i said the whole children script/collider thing is fiddly lol.

sly marsh
jolly ravine
#

is there also a pivot offset somewhere? i have a vague memory of tweaking that but ... idk? lol

#

maybe i'm just imagining that

sly marsh
jolly ravine
#

alright i'll just revamp the prefab it's probably just me needing to learn that system. thanks a lot for your time though.

sly marsh
#

No problem, happy to help, good luck UnityChanThumbsUp

jolly ravine
#

cheers