Hello,
In the API Documentation and within the new collision example comments, there is a paragraph that says:
“For example, in a platform game, you may wish to construct “one-sided” platforms that the character can jump vertically through, but only in one direction”
While explaining the preCollision event.
I have been trying EVERYTHING I can think of to implement one-sided platforms where the player can jump through the bottom of the platform and land on the top but I can’t seem to figure it out… so I figured it’s time to consult the forums.
Since the people at Ansca made the examples and wrote the documentation implying it is in fact possible to do, PLEASE explain how this can be done.
So far I’ve tried…
Detecting where the player is in relation to the platform on preCollision and setting .isBodyActive on the platform (or the player) to false IF the player came from UNDERNEATH the platform.
When I do that, the player DOES in fact pass through the platform, but since the body is INACTIVE, the preCollision event does not fire anymore, therefore it never knows when to set the body back to ACTIVE, thus allowing the player to land on top of it…
I felt like I was SO close when I got the player to pass through the bottom of the platform, but then realized I was stuck when he would not land back on top of it, so any help anyone can provide would be GREATLY appreciated.
Thank you very much!
Jonathan Beebe
[import]uid: 7849 topic_id: 1805 reply_id: 301805[/import]
… If not now then hopefully someday in the future.