# Ignore forces from certain objects?

## Ignore forces from certain objects?

This might be a little tricky to explain, but what I think I need is some kind of way to ignore forces from certainobjects.Basically I want the player in the game to be able to hang on walls. And what I do to make it work is simple, I just add some strong forces under the players feets and point them right into the wall (if the player have contact with it). Now the friction will make the player hang on the wall.But the force I need to add is kinda big, but it's ok as long as the wall isHK_COLLIDABLE_QUALITY_FIXED.The problem is that it's not always the case, so the force will make all dynamic objects to move.This image might illustrate it: (The tower will fall)http://www.drvn.se/hang_on_the_wall.jpgSo how do I make thedynamic object ignore the force from the players feet? Or can I add some sort of anti-force to neutralize it?

2 posts / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

I'm not sure this is the best way to go about solving this problem.
Firstly, relying on friction to clamp the character to the wall may be unpredictable and not work in all situations.
Secondly, the large force is unphysical - it wouldn't happen like that in the real world - so it's bound to produce unphysical results.
Once you start down that road you'll probably find you'll have to add more and more fudges to make the simulation behave as you'd like.
Now, Havok physics certainly isn't real-world physics, but when fudging or making approximations it's better to stay as close as you can to real world behavior so that the results won't be too unexpected.

I'd suggest maybe trying a breakable constraint between the character foot (or other body part) and the wall.
Check the Physics/Api/Constraints/BreakableConstraint demo for a starting point.
You should be able to toggle the constraint on and off, and while it's in the 'broken' state, reset the constraint pivot so that the character's foot will stick to a different part of the wall on the next foothold.

That said, if you really want or need to do it with large forces, you might be able to add an action that would exert the force on the character foot, and a corresponding opposite force on the wall at the contact point.
As I say though, that's probably not an ideal solution.

Cormac