This site requires JavaScript, please enable it in your browser!
Greenfoot back
footpickle
footpickle wrote ...

2020/3/12

how to make a solid object that a player can touch?

footpickle footpickle

2020/3/12

#
I'm trying to make a 2d platformer-like game, but the character sinks into the ground. also, my character's hitbox is in the middle of him, so he sinks halfway into the bottom of the scren. Does anyone have any suggestions to fix this?
danpost danpost

2020/3/12

#
footpickle wrote...
I'm trying to make a 2d platformer-like game, but the character sinks into the ground. also, my character's hitbox is in the middle of him, so he sinks halfway into the bottom of the scren. Does anyone have any suggestions to fix this?
Adjust position when touching so it is not touching. Knowing the direction of movement that got the actor to touch is useful in determining which way to adjust the actor's position.
CieloMungcal CieloMungcal

2020/3/12

#
@danpost can you please give an example code for that?
danpost danpost

2020/3/12

#
CieloMungcal wrote...
@danpost can you please give an example code for that?
Jump and Run Demo w/Moving Platform
footpickle footpickle

2020/3/12

#
I don't understand.
danpost danpost

2020/3/12

#
footpickle wrote...
I don't understand.
Go to and run the linked scenario. Then, click the Who button to view the class code of the "player".
You need to login to post a reply.