Realizing the top of an actor problem

digitalzerodigitalzero Member, BASIC Posts: 639

I'm making a platform game where when the player collides with the "ground" it will set its jump count back to zero.... Now everything works fine and dandy HOWEVER there is a small problem... I have a lot of vertical rectangles that are placed and also a couple of half pyramid objects set too... Kind of like the half pyramid you may see in mario right before you jump to gain the flag... And i need to make sure the character is touching the top of the surface because as of now as long as you're touching the object period you can jump and yes that may work well with maybe a wall to wall jump but i am not necessarily looking for that... Can someone help? And by finding the top of that actor i would also be able to find the bottom of the actor for a "smoosh" effect which will result in an instant death

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You can either constrain a smaller actor to the top "collideable" part of the pyramid actor and use that smaller actor to detect collisions or you can use a custom collision shape for your pyramid actor and import the data for that.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    How would that be coded...? In the player actor or the platform actor?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    All you need to do is add an actor to spots where you want the hero to be able to jump just like the ground. Just add that actor to your jump rules and set the rule to any or just put any jump able actors under a tag.

Sign In or Register to comment.