Pages 1
Universal Fighting Engine Forum Due to increased bot activity, we have discontinued support through the forum. For assistance, questions, and community discussions, please join our official Discord server |
You are not logged in. Please login or register.
Universal Fighting Engine Forum → Source Coding → "Sticky" Projectiles
Its a bit complicated, but there is a a way this can work.
Under Projectile.cs, add this line around line 27:
public bool stickToCharacter;
Under MoveEditorWindow.cs, add this before line 3652 (before the "Apply Gravity" line):
moveInfo.projectiles[i].stickToCharacter = EditorGUILayout.Toggle("Stick to Character", moveInfo.projectiles[i].stickToCharacter);
Now under ProjectileMoveScript.cs, add this around line 214 (before the comment line that says "// Get Auto Bounds"):
if (data.stickToCharacter)
{
fpTransform.position = myControlsScript.HitBoxes.GetPosition(data.bodyPart);
}
This code will force the projectile to be constantly sticking to a specific body part. To make a projectile rotate around the character, make a game object rotate around the character, assign it a body part under Character Editor -> Hitbox Setup (collision type = no collider) and set it as the Body Part Origin under your projectile move file.
Warning: Manual rotation may not perfectly synchronize with the rollback netcode.
Universal Fighting Engine Forum → Source Coding → "Sticky" Projectiles
Powered by PunBB, supported by Informer Technologies, Inc.