Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Direction Caculation to an object - A Config Script for Baldi's Basics

4 134 bytes Raw Code
1
2
3
4
public Vector3 DirectionCaculation(Vector3 targetObject, Vector3 movingObject)
{
return (targetObject - movingObject).normalized;
}
I've been currently had to a lot of vector math when it comes to Baldi's Basics in Boss Battles. One such is direction so I have this handy function/void I made to give you it. Make sure to credit me if you use this. It's recommened if you put this in your GameController Script because its the most relevant and easiest to reference.
Sign up to access this!
  • JohnsterSpaceProgram avatar
    JohnsterSpaceProgram username pic Joined 3y ago
    Somewhere Else
    8,119 points Ranked 887th
    32 medals 4 legendary 5 rare
    • 2019 Top Contributor Medal icon
    • Returned 5000 times Medal icon
    • Became a Ripe Supporter Medal icon
    • Reached 100 subscribers Medal icon
    • Returned 1000 times Medal icon
    • 10 submissions featured Medal icon
    JohnsterSpaceProgram avatar
    JohnsterSpaceProgram
    Johnster Space Studio Flag
    Affiliation
    Johnster Space Studio
    1y
    Do you use this to determine that if the player is a certain distance from a boss, then the boss won't attack them? Or have you used it for something else when determining player distance from a boss?
    Pro Modder, Dev, Helper, Coder avatar
    Mantra
    Pro Modder, Dev, Helper, Coder
    URL to post: