I'm struggling with controls!


Hello everybody.

I know you probably waiting for new update (because I didn't make any update this year), so ... I wanna tell y'all - I'm struggling with controls! 

I'm struggling with picking up the items, I know that I can use method like in games like ( Mario / Sonic / Heidi: The Game (2005) / etc.. ), it's when your character just go through the floating object to pick it up the item, like this:


But this method is not for this game, because this maze is not so big (I mean the path in the maze), and she need to picking up about 15 item's variations, and every variation have as minimum 3 items (for example: keys - in this game is 3, apples - under the tree about 5 [but in this game will be about 4 apple trees], sticks - many of them just laying around the maze, etc...), and if they all will be floating it's will be a mess, so I really wanted to create something like this:

But I still can't figure it out how to do that, because I wanted to make this game in "3rd Person View", but she just overlaps items in front of her for the camera, so ... I'm really don't know how to realize that, and also I need that she can put any item on floor either.

And also she will be not only picking up the items, she will be also holding the big items (which she can't put in her bag), like this ones:


And also she will balance on thin objects like logs:


So that's why I have a problem, how I can combine all this ideas in this game?

My main story line already writen down, and this functions is a main puzzles for this story, so ... right now I'm thinking how to realize that.

Comments

Log in with itch.io to leave a comment.

Use the AnimationPlayer node for picking up items. You should be able to use it to position your character where needed (relative to the item) and temporarily switch to a camera where you can better see what is getting picked up before switching back to your main camera.  (you can trigger functions in the animation player)

For the different pickup and walking animations, you can keep track of these with a state variable in your player script. When you pick up the item, change the state in your player script to match:

if state == "carryPot": #run carryPot anim

elif state == "carryBucket": #run carryBucket anim

else: #run standard walk anim


For the log Animation, use a Raycast from your player to detect the log. 

add the log to a group, "log", and then in your player script, if Raycast is colliding with an object in the log group (you should be able to find the exact function to use in the documentation, it think it's raycast.getCollider().isInGroup() or something like that...) , change the state to something like "walkingOnLog" and adjust the animation accordingly like I mentioned above.


Hope this helps. Good luck on your project.

Thank you so much!

I will try to do something like that, especially I like the idea using RayCast for detecting the log, I didn't thought about that, that's brilliant, hmm ... if to think about it, I can try to use RayCast for detecting pickable items too, to detect which I can pick-up and which can't.