Physics Game Help (Platformer)

Hey Ive been having a hard time getting past some issues that have come up and i was wondering if anyone could help out at all.
Ive been using a pawn instead of character actor and i think its the root of most of my problems. I’ve been getting decent results game play wise with the pawn
so i want to stick with it but im open to different things. also the pawn is a ball and the movement and gravity is driven by force.

Moving platforms and player pawns

So i understand this is really easy with a character actor, I’ve looked into some work arounds for player pawns but i keep getting boned.
Adding location offset and trying to add the velocity to the pawn hasn’t worked out for me so far. I read in a unity forum that someone solved a similar problem by making the
pawn the child of the moving platform but i don’t think that’s a thing in Unreal.
most of my pursuits shoot my player off the map, and sometimes randomly kill the actor.

also teleporting is something I’ve had issues with while using this character.

Sound fx hit events

“can jump” is set by a ray trace shooting down the z axis. when the length is under a set amount jump is available again and a sounds plays. Im having hard time figuring out how to have
the sound play properly when the pawn hits something in air and runs into a vertical surface but I keep running into the sound effect playing like a jack hammer

I tried to make the sounds effect work on hit events for vertical surfaces, making the sound activate if the pawn hits a different object. so on hit it stores the object information and compares it to the next hit event and finds out if its touching the floor or a wall or a rock. i set it to do once but i still get the same issue. if the ball is touching two surfaces at the same time like if it was sitting in a corner the hit event bounces between registering the object infinitely

The first part I can’t really help with. If you are going to make a physics ball based game, why not start with the epic template? :slight_smile:

The sound I can help with.


Hey thanks so much for the reply!

Thats a great solution but my vertical landings aren’t giving so much trouble. I have “Is in air” set on ray traces using the same formula so that i also get a sound effect if i roll off of something.

Sound events on the X/Y and giving me issue. Ive tried to use impact force to track the information and having a similar “Has Played” boolean hooked up to only play is the player touches a new object. ( on hit stores and compares the object data to next hit ) but they still come down to the same issue.

Im trying to figure out a way around this:

I thought i could just kill two birds with one stone and hook up the volume of the sound to the force of the hit but i found that if you’re touching two objects at once it will keep flipping back
and forth between the two objects rapidly sinking my vertical/horizontal detect.
anyways thats whats causing the jackhammer.

Lol i used the ball template as a point of reference but ive beefed it up a bit. the OG template is kind of a bummer so i added camera rotation, rolling momentum etc.
Im trying to figure out how to add momentum on angled surfaces now.

I don’t know if this is any use as a starting point, but it will keep the default third person pawn at the same angle as the normal on all surfaces:

As far as the sound goes, it seems a bit involved. One thing you could do is make it’s concurrency 1.

How about using an if branching node (if a and/or b and/or c), then determining sound to stop for certain conditions met, such as (if a and c, then stop sound). Could do a double check that a sound is / isn’t playing after those conditional checks, once (not a double check for each condition, but one check that is after them all), and stop or reset system based on results.

Hey guy I think i Figured it out!

Okay so currently i have the hit events registering the normal impulse. i took the vector added it all together and divided it by 10000 to make it manageable and set criteria for what happens on hit.
.3 -.6 was general movement. 1.5 - 30 were landing events. I hooked that number up to dictate the pitch and volume of the sound effect.

I broke the numbers into two groups so that they would divide into values between 0 - 2 easier. ( 1 / 10 = .1)( 12/12 = 1)( 24/12 = 2)
I’m not much of a math whiz i dont really know how to do this equation cleanly. It still needs some work but I’m pretty excited

I think the jackhammer thing is unavoidable, but i think i could use it as an advantage. Ive been having a hard time finding info/ figuring out how to do it. does anyone know how to make a sort of reverse doN node? like if an event happens n times in a span of time it executes an event.
If i could figure this out it might be an effective way to unstuck the character if anything unexpected happens. = character clips into wall. collision reads crazy impulses, fires sound event 10 times in a second tells the game to teleport the pawn a foot away.

edit heres a video of the results. drive was taking forever to convert.