Topic: Prevent player from pushing opponent
As you can see in video player1 can push player2 and also on boundary. How can I prevent this?
https://drive.google.com/file/d/1hEQUux … sp=sharing
Universal Fighting Engine Forum We are no longer using the forum to answer questions due to bot attacks. Please use our discord instead: https://discord.gg/hGMZhF7 |
You are not logged in. Please login or register.
Universal Fighting Engine Forum → 3D Gameplay → Prevent player from pushing opponent
As you can see in video player1 can push player2 and also on boundary. How can I prevent this?
https://drive.google.com/file/d/1hEQUux … sp=sharing
You will need the source code to change that behavior.
Under ControlsScript.cs, look for function pushOpponentsAway
Now look for these segments and comment them (add // at the beginning of each line):
opControlsScript.worldTransform.Translate(new FPVector(.1 * -pushForce, 0, 0));
and
opControlsScript.worldTransform.Translate(new FPVector(.1 * pushForce, 0, 0));
I'll see if I can add an editor option for these in future updates.
Fixing this issue creates another.
I'm working on a bonus stage where you have to destroy a car that stands still. If, I follow your instructions car will not be pushed but self applied forces on player mess things up and player gets stuck inside car mesh. I'm even checking for hit box collisions before adding force inside "AddForce" function.but if the self applied force is too much it doesn't work e.g wall launcher
Fix64 pushForce = CollisionManager.TestCollision(controlScript.myHitBoxesScript.hitBoxes, controlScript.opControlsScript.HitBoxes.hitBoxes, false, false);
if (pushForce <= 0 || UFE.gameMode != GameMode.BonusStage)
//Apply force
How can I check collision by factoring in activeforces?
Universal Fighting Engine Forum → 3D Gameplay → Prevent player from pushing opponent
Powered by PunBB, supported by Informer Technologies, Inc.