How to add physics to character (Being pushed by force)?

Hi!

I have a question concerning physics on characters. In the game I’m currently working on, the player has to shoot platforms so they can expand. Some of them go out really fast and I planned in my level design that they, for example, shoot the player in the air if he stands on one and shoots it. So in other words, the player would fly off in the air for some time.

The problem is, for now, no matter how quick the platform moves when going up, or on the side, and the player stands on it, he just stays on the platform, like if he was glued to it. So I wondered if there’s a way to enable physics on the character, so that when he gets pushed by something, he flies off in the direction he was pushed?

I tried looking into the Character Movement, in the Character, I tried changing some values, but for now, I haven’t found anything.

Thanks in advance, and if you need precisions, just let me know!

What values have you tried changing? Should be as simple as checking the box ‘Simulate Physics’ then whatever force you have “push” the player, like a projectile, ensure it has an impulse setting (impulse is for a moving object like a projectile.) The higher the impulse (which loosely is it’s velocity with an added force) the more the object gets “pushed” or moved by the instigator (see the First Person Template for an idea of how a projectile knocks back the blocks in the level using impulse.)

Also ensure that all relevant collisions are set to “Block” the proper type of object (i.e. Pawn “Blocks” Projectile and Projectile is set to “Block” Pawn.) For not projectile objects, simply using the right collision combinations should solve the issue (i.e. a low ceiling pushes the player off the moving platform if he doesn’t crouch under it.)

Sadly, when you activate ‘‘Simulate Physics’’ on the character, you lose control of it and can’t move. I guess it makes sense. But thank you for the suggestion!

I’ve actually managed to make it work by using Add Impulse on the character movement, but it’s very manual and tedious because I have to tell the direction in which to impulse for each platform.

So I’m still curious if there’s an automatic way to put force/impulse physics on a character, I would find it surprising that there’s no way to do it.

This is pure speculation as im only just a beginner, but heres my two cents

Could you not make somthing where when you trigger a custom event (shooting the platform) it toggles “simulate physics”, you apply the impulse and then toggle the simulate off again, you could use delay nodes to help with this, i think if you used a sequence node you could trigger the physics and impulse almost simultaneously and with a brief delay after the physics toggle, toggle it back on to regain control

like i said im a total beginner, is there any logic to this? xP

Maybe it could work, but the Add Impulse already does what I wanted it to do :stuck_out_tongue: Your suggestion is pretty similar to my solution, with Simulate Physics added, but then again, you have to ‘‘hard-code’’ it a bit. But thanks for the suggestion!