Pipes standing on top and moving from 1 location to another

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rodell2020

Ok [Godot 3.2.1 windows 2D.] I can switch to another version of Godot (if needed)

what I am trying to do is
create a pipe
then make it so that I can do both
[A] stand on top of it (I.E static body 2d)
[B] push the E key to go down into the pipe (I.E go from where the pipe is located to another place on my scene.]

so far I have tried Static body 2D with Collision shape 2D attached (it allows me to stand on top of it) but it will not allow me to go from location to location

or an Area2D with CollisionShape2D that allows me to go from 1 location to the other
but i can not stand on top of it

I have also tried creating one and adding the other (does not work)

:bust_in_silhouette: Reply From: Gluon

If you put the area2d on top of the pipe and a collision shape in the pipe itself and create an animation which looks like the sprite going down (i.e. cutting the sprite off piece by piece to give the illusion of going down) you should be able to do it that way.

OK that did not work lets try this way:

                                       

                                                  top of pipe[location a]
                                                     pipe-A
                              

when a character walks up to pipe-A and jumps straight up he lands(where it says top of pipe) with him standing there if he presses the e key he then goes to [location-b] other wise he still stands there

[location-b] is way down here

p.s (if you can take time to create an image and code needed and send it to me)

rodell2020 | 2022-04-06 20:58