Hi, so I finally got my gravity flip to work. My character can now switch between the floor and the ceiling. My currently problem is now is that I can’t jump while standing on the ceiling. I believe this is because of the “is falling” feature. Any ideas of how I can fix this? Thanks
In your jump function, maybe just use a branch so that when the player hits the jump input, you check if they’re on the floor or the ceiling, and if they’re on the floor you jump and if they’re on the ceiling you launch them -1*JumpZVelocity in the Z axis (just fake an upside down jump)
This will work fine if you’re doing a single player game, let me know if you aren’t, then it gets trickier.
thanks for the reply. This is a single player 2d side scroller. I thought about doing what you suggested, but I can not sure how to modified the jump function that is built into the 2d paper template. Anyways, I decided to use this mechanic differently. Would like like to figure this one out someday.
Do you have a bool which indicated if you’re on the ceiling or not? You could make a branch and use that bool to decide if you’re doing a normal jump or the downwards launch. So if you press space you check if you’re on the ceiling, if you are launch down, if not, if you’re on the ground, jump normally with the built in jump, otherwise do nothing because you’re in the air, right? Let me know if that’s a problematic approach of if I’ve been too vague. I can provide a screenshot of how I’d do it if you are confused, just not at the moment unfortunately.
This is a great approach. I do not have a bool of whether I’m on the ceiling or not. I wasn’t sure how to approach that. I was thinking of checking my to see if there a z velocity on the character and if im rotated upside. If so, then I’m on the ceiling. I might consider trying this in the future. But for now, since my character is going to be metallic, I can flip gravity so it’s like a magnet to the ceiling. Where you can’t jump off, but are forced to use the jet pack. I find this a great opportunity to teach and challenge the player to use the jet pack differently than other games. I decided that a gravity flip might invalidate the use of the jet pack or vise versa. Thanks for the reply!
That makes sense to me! If you feel the issue has been solved I guess mark my answer as accepted so the ticket appears closed (this helps Epic as far as I understand), good luck with your game!