How to make a character bounce off a wall?

Thanks for that.

** your ‘solution’ would maybe work with ZERO-G,??..

THANKS!**

Just tested it with no gravity, it works absolutely fine. Try it out. This improved version has @StefanHohnwald’s brilliant tip about Parent Tick!

Implemented in the character and with Gravity Scale set to 0, it’s pretty fun, actually. You instantly regret not having any surface nearby and wish for directorial boosters or sorts. Just keep the *bounce multi *variable low, otherwise you’ll build up momentum fast. The player velocity could probably need a clamp as well, just in case.

Any component with the *noBounce *tag will be ignored as a bouncy surface. This also opens up for an easy implementation of different surfaces having different properties affecting the magnitude of the bounce.

If you do not feel versed in blueprints, consider passing this info along to one of your scriptwriters. Hopefully, they will find it useful.

Keep in mind that no one here is obligated to help, if someone helps then they do it by sacrificing their own free time or development work time to** research stuff for you. **Talking down to them or the community in general is in no way a motivation for anyone to help you. If no one gives you an answer to your soluition that doesn’t neccessarily mean that you are getting ignored or mistreated, it most likely means that no one reading the forums has needed a solution for your problem before or that those who do know the solution either don’t read the forums or are too busy with their own projects.

For bounce physics, google has tons of results when you search for “3d math bounce vector normal”, this link helps alot understanding the basic physics behind bouncing
https://www.3dkingdoms.com/weekly/weekly.php?a=2

Ok, rant being done (i hope you didn’t take it too personally), lets try to help you : I’ve been trying to see what exactly you need, but many of your different posts desriptions/wordings of what you want is quite different, so it’s quite hard to grasp what exactly you need.

Lets take this one step at a time.

First basic bouncing:
Take a look or try out this stuff and report back what you need changed and what needs fixing/tweaks, i’ll try to help you as much as i can.

If you want your character to bounce off any wall, regardless of the angle, add a “Last Velocity” Vector variable to your object to save what velocity you had BEFORE you hit something and use this graph and you’ll bounce off anything that hits your characters capsule component
We’ll add stuff to it later to make it do exactly what you want.

later I’ll download your test project that you uploaded and check what i can do.

[/QUOTE]

**Thanks Stephan Thank you for the ‘rant’, “please keep in mind” i’m 7 months into reading many many little ‘rants’ and insults, I started perfectly polite and patient 7 months ago, when I first asked this exact same question.

I also asked if people don’t KNOW the solution and are unwilling to edit my BP, THEN PLEASE SAVE YOUR TIME AND MINE, DO NOT POST AT ALL and CONFUSE ME FURTHER! No one listened. To this day, I get solutions that are FLOOR BASED, or CHARACTER MESH BASED, that have nothing to do with what I’m doing. i AM SORRY, BUT IT IS MADDENING!! Like a carrot on a string and the carrot is a hologram,…

Anyways, thank you for your advice, I will add it to the 30 foot pile! (I also try to inject a little humour into everythng I say, NOT ONE PERSON HERE HAS PICKED UP ON THAT - ALL YOU SEEM TO SEE IS NEGATIVE.

WORST 7 MONTHS OF MY LIFE AND I AM A RECENT CANCER SURVIVOR, YOU GET THAT RIGHT? THIS PLACE FEELS WORSE THAN CANCER. CUT ME SOME SLACK. LET ME BE ME.

On to why we are actually here: as you can see from the BP and 7 months of discussion, , it is a First Person VR Zero-G game, there Literally IS NO MESH CHARACTER to ‘launch’… I tried assigning this to my dynamically created pawn ‘potential’ and,. well, it wants a ‘mesh character’ –

Honestly, I do fine with the ‘Set Physics Linear Velocity’, I get a small perfect bounce, I MERELY need to know how to tell it what direction and speed as X Y Z variables in the Set Physics Linear Velocity,…

I will try to merge your solution with it too though, I try everything, THANKS FOR TRYING,…Do you have the original BP? The original Zero-G author might be working on it which will be ideal, he is apparently the inventor of a whole new way to use Unreal BPs, because no one else can get their heads around it! :slight_smile:

Here is the relevant part of the BP, I have in the Green (selected) ‘Set Physics Linear Velocity’ X0 Y100 and Z 0 this gives me a perfect little bounce in Y upon any hit (except pickups)

SO, how to tell it these three X Y Z numbers dynamically? :slight_smile:

TY!**

@NextWorldVR Just some questions. How are you defining your player collisions, are you using a character or pawn and is your collider simulating physics? Also, you mention in your other thread lerping, is your ultimate goal to have physics driven bounce or more of a stylized effect?

One thing I’ve noticed in my own testing is that a pawn collision, with floating movement component, will not add any velocity to either the collision or movement component on hit. It works if I have another input (I’m using space bar) to trigger the set velocity.

OK. So here’s my take on this. May or may not be what you need but this is the only way I could get my scenario to work correctly (before applying any fancy code to spruce things up).

You are trying to help!? :slight_smile: ) Thank you! I just want the simplest of bounces so that I don’t come to an instant standstill the second you touch, collide or brush against a wall. I have no requirement other than that Literally… Turning on physics (for this part of it) breaks other things (the Zero G floating stops working, you throw yourself away from a wall, then FREEZE in mid air! So Some version or adding a simple quasi manual impulse or force (or using Set Physics Linear Velocity) seems to be the only way. I will try to add the relevant portion below. With a number =-OF 10 or 100, in the Y variable box of ‘Set Physics Linear Velocity’ I get a perfect little bounce JUST, IN A ‘SET’ direction, instead of THE ‘CORRECT’ DIRECTION (relative to my direction before/during collision) …
I this image, the relevant Node is Selected in green, (on far right) See the 100 in 'Y"? That’s give a perfect bounce, but always in the same direction. I just need to find a way to change these number dynamically, tell this node, What direction to go, that ‘continues my direction’ before hitting based on angle and speed prior to or during collision!
​​​​ What you show above, is too advanced for me, I would not know where to begin to incorporate it in the BP I have to wrk wit. I am mostly a Character Animator. I SENSE it is VERY SIMPLE… I just need to tell ‘Set Physics Linear Velocity’, the info it needs to do an EMULATED bounce, even if only reasonably correct, it will be better than Instantly Freezing in place!

THANK YOU!

or… use the inbuilt tools, just add a “ProjectionMovement” component onto your character, it has built in bounce, if your in zero g, your character is now effectively a projectile right?

The Plus 50 node governs bounce speed, you could feed that as a factor of thrust, or whatever directional force you’re using to either add or reduce bounce, or zero it out.

this is over simplified as a quick example, but the basic idea is good, and works if your character has movement gravity set to zero, and you have gravity set to zero in the projectile it works, not sure how you have the thrusters setup for 3 dimensional movement, but regardless of character facing direction you’re good. Looks like the projectile movement already takes care of acute angles for sliding, depends on if your thrusters are on or not? Will require tweaks to setting to get desired movement, but is pretty close with the above, just depends what you all ready have in place.

@NextWorldVR
I don’t really know how else to help with this without handling your blueprint directly. The bit of bp I show there should work on its own. It’s been a while so I’ll have to check back and see if I am using physics or not (I’ll try to remember to post when I get home). I’ll also have to try out Basement Bob’s solution to see if it is compatible in my setup.

The worst case scenario I see is having to rebuild the handgrabs and thruster behavior in order to be compatible with bouncing.

I did not previously test with an oculus rift as my tower’s motherboard was out of commission. It has since been repaired so I’m good to go with a more relevant testing scenario.

Hey man, hope you manage to get out of VFX… I’m 20+ years here myself, aiming to get out too. Not quite sure what your issue is here and don’t quite have the time right now but whenever you’re really stuck I start a fresh project and do whatever it is I’m stuck with in the simplest environment. Helps me out quite often.

Good luck.

I sure appreciate it! I have decided not to let it stop me anymore, I realized I could, in the ‘description’ say the Walls are Slightly Magnetized, so unless you ‘catch yourself’ and you hit or brush against a wall or object you will STICK to it and have to use Thrusters or Grip Controls to re-Accelerate. LOL and the other thing too, I have 4 projects going at the same time, (oh,. make that 5…) I do a little on each every day, some more than others,.
So anything you can do I will incorporate , be grateful and give you (and NikoKun) credit, otherwise I will say the walls are Sticky with Nano-Magnetism! LOL :slight_smile: Or, that the Strong Nuclear Force is EXPANDING do to some Nebula’s effects LOL :slight_smile:

Are you a Star Trek Fan / Trekker? CBS just MURDERED my RETIREMENT PLAN (Exploring the ENTIRE USS Enterprise with Interactive buttons, Flyable Shuttles,… ) In a Game made by Fans called STAGE 9. I am going to try to MOD it,. They actually finished most of it, It is SO AMAZING to walk the Halls of the Enterprise, fire torpedos, Fly a Runabout,.) You have any interest? Also,. it is a Oculus Rift Compatible VR app… Have you tried it? (off subject I know, LOL)

"SO, how to tell it these three X Y Z numbers dynamically? "

Hello,
I know this post was from 2018 but anyway, some of the reply helped me a lot to get my pawn bounce so I will try to help as well if the probleme is still alive.
Actually I don’t know how does the VR pawn work but if it has a “forward vector”, you could use use with the node “Mirror vector by normal” and the normal would be the “Impact normal” from the hit result (if you have a hit result, otherwise you could try to get the normal from the wall idk how :x ) and then multiply the resultat by x := 100 y= 100 z =100 or whatever offset.
Then you could plug the result in your “Set Physics Linear Velocity” Node.

Idk if it can work like it in VR but well at least I tried to help :slight_smile: