Wallrun and Backstabbing

Discussion in 'Spigot Plugin Development' started by DasDarki, May 29, 2016.

  1. I am working on a Assassins Creed Plugin and I need help with the Wallrun and the Backsabbing Ability. I dont know how I can do that pls help.
  2. What have you tried.
  3. Backstabbing is easy, here's a thread from a year ago that should still help.

    Wallrunning is difficult, if you don't have experience with vectors it's not going to be easy.
    Might want to just install a plugin that does it, or look at the code from another plugin that does that and learn from it.
  4. Thanks. Is there a source of a plugin with wallrunning?
  5. But if i have to calculate with vectors it wont me so bad because I calculate with vecs in the school
  6. Yes it's called google. Pretty cool site.
  7. Yeah xD
  8. Is there a way to testfor blocks arround the Player?
  9. You get their location and loop through blocks around the location using coordinates.
  10. Just as a completely random thought.

    Can you check if a wall is next to a player, then create barrier blocks beneath the player.
  11. Code (Text):

            Location playerLoc = damager.getLocation();
            Location targetLoc = damagee.getLocation();
            double pvecy = -Math.sin(Math.toRadians(playerLoc.getPitch()));
            double pvecx = -Math.cos(Math.toRadians(playerLoc.getPitch())) * Math.sin(Math.toRadians(playerLoc.getYaw()));
            double pvecz = Math.cos(Math.toRadians(playerLoc.getPitch())) * Math.cos(Math.toRadians(playerLoc.getYaw()));
            double tvecy = -Math.sin(Math.toRadians(targetLoc.getPitch()));
            double tvecx = -Math.cos(Math.toRadians(targetLoc.getPitch())) * Math.sin(Math.toRadians(targetLoc.getYaw()));
            double tvecz = Math.cos(Math.toRadians(targetLoc.getPitch())) * Math.cos(Math.toRadians(targetLoc.getYaw()));
            double dot = tvecx * pvecx + tvecy * pvecy + tvecz * pvecz;
            if (dot > 0.6D)
                 //do code here
  12. I think this is the backstabbing code?
  13. There is absolutely no need to use that code. That just overuses sin and cos a lot which simply isn't a good thing to do.

    I'd say you use the target's vector and attacker's direction, get the dot product and see if it's bigger than a certain number. I haven't really worked with a dot product before so sadly I can't help you more than this. Good luck :)
  14. I have a friend who has made a WallRun thing. Lemme tag him for you.

  15. I never said that I will use TheS7Ws Code, I want to try it on my own^^
    • Like Like x 1