How to build upon Jongallant’s verlet integration rope project?

In order to build 2d rope physics in my game, I download the github project from Jongallant in this link. In my game, I want the rope to collide with objects with differents types of colliders such as box collider or polygon collider.

I made modification to the code of the project file. In Rope script, I have the following lines :

using System.Collections.Generic; using UnityEngine;  public class Rope : MonoBehaviour {     LineRenderer LineRenderer;     Vector3[] LinePositions;      private List<RopeNode> RopeNodes = new List<RopeNode>();     private float NodeDistance = 0.2f;     private int TotalNodes = 50;     private float RopeWidth = 0.1f;      Camera Camera;      int LayerMask = 1;     ContactFilter2D ContactFilter;         RaycastHit2D[] RaycastHitBuffer = new RaycastHit2D[10];     RaycastHit2D[] RaycastHitBuffer1 = new RaycastHit2D[10];     Collider2D[] ColliderHitBuffer = new Collider2D[10];      Vector3 Gravity = new Vector2(0f, -5f);     Vector2 Node1Lock;      void Start()     {         Camera = Camera.main;          ContactFilter = new ContactFilter2D         {             layerMask = LayerMask,             useTriggers = false,         };          LineRenderer = this.GetComponent<LineRenderer>();          // Generate some rope nodes based on properties         Vector3 startPosition =;         for (int i = 0; i < TotalNodes; i++)         {                         RopeNode node = (GameObject.Instantiate(Resources.Load("RopeNode") as GameObject)).GetComponent<RopeNode>();             node.transform.position = startPosition;             node.PreviousPosition = startPosition;             RopeNodes.Add(node);              startPosition.y -= NodeDistance;         }          // for line renderer data         LinePositions = new Vector3[TotalNodes];     }       void Update()     {         // Attach rope end to mouse click position         if (Input.GetMouseButtonDown(0))         {             Node1Lock = Camera.ScreenToWorldPoint(Input.mousePosition);         }          DrawRope();     }      private void FixedUpdate()     {         Simulate();                                 // Higher iteration results in stiffer ropes and stable simulation         for (int i = 0; i < 80; i++)         {             ApplyConstraint();              // Playing around with adjusting collisions at intervals - still stable when iterations are skipped             if (i % 2 == 1)                 AdjustCollisions();         }     }      private void Simulate()     {         // step each node in rope         for (int i = 0; i < TotalNodes; i++)         {                         // derive the velocity from previous frame             Vector3 velocity = RopeNodes[i].transform.position - RopeNodes[i].PreviousPosition;             RopeNodes[i].PreviousPosition = RopeNodes[i].transform.position;              // calculate new position             Vector3 newPos = RopeNodes[i].transform.position + velocity;             newPos += Gravity * Time.fixedDeltaTime;             Vector3 direction = RopeNodes[i].transform.position - newPos;                                      // cast ray towards this position to check for a collision             int result = -1;             result = Physics2D.CircleCast(RopeNodes[i].transform.position, RopeNodes[i].transform.localScale.x / 2f, -direction.normalized, ContactFilter, RaycastHitBuffer, direction.magnitude);              if (result > 0)             {                 for (int n = 0; n < result; n++)                 {                                         if (RaycastHitBuffer[n].collider.gameObject.layer == 9 || RaycastHitBuffer[n].collider.gameObject.layer == 10)                     {                         Vector2 hitPos = RaycastHitBuffer[n].point;                         newPos = hitPos;                         break;                                                      }                 }             }              RopeNodes[i].transform.position = newPos;         }     }          private void AdjustCollisions()     {         // Loop rope nodes and check if currently colliding         for (int i = 0; i < TotalNodes - 1; i++)         {             RopeNode node = RopeNodes[i];              int result = -1;             result = Physics2D.OverlapCircleNonAlloc(node.transform.position, node.transform.localScale.x / 2f, ColliderHitBuffer);              if (result > 0)             {                 for (int n = 0; n < result; n++)                 {                     if (ColliderHitBuffer[n].gameObject.layer != 8)                     {                         if(ColliderHitBuffer[n].gameObject.layer == 9) {                             // Adjust the rope node position to be outside collision                             Vector3 collidercenter = ColliderHitBuffer[n].transform.position;                             Vector3 collisionDirection = node.transform.position - collidercenter;                              Vector3 hitPos = collidercenter + collisionDirection.normalized * ((ColliderHitBuffer[n].transform.localScale.x / 2f) + (node.transform.localScale.x / 2f));                             node.transform.position = hitPos;                             break;                          } else if (ColliderHitBuffer[n].gameObject.layer == 10) {                              Vector3 velocity = RopeNodes[i].transform.position - RopeNodes[i].PreviousPosition;                                                          Vector3 newPos = RopeNodes[i].transform.position + velocity;                             newPos += Gravity * Time.fixedDeltaTime;                             Vector3 direction = RopeNodes[i].transform.position - newPos;                                                                      int result1 = -1;                             result1 = Physics2D.CircleCast(RopeNodes[i].transform.position, RopeNodes[i].transform.localScale.x / 2f, -direction.normalized, ContactFilter, RaycastHitBuffer1, direction.magnitude);                              if (result1 > 0)                             {                                 for (int m = 0; m < result1; m++)                                 {                                                         if (RaycastHitBuffer1[m].collider.gameObject.layer == 10)                                     {                                         Vector3 collidercenter = ColliderHitBuffer[n].transform.position;                                         Vector3 collisionDirection = node.transform.position - collidercenter;                                          Vector3 raycastHit2DPoint = new Vector3(RaycastHitBuffer1[n].point.x, RaycastHitBuffer1[n].point.y, 0);                                          Vector3 hitPos1 = raycastHit2DPoint + collisionDirection.normalized * (node.transform.localScale.x / 2f);                                         node.transform.position = hitPos1;                                         break;                                               }                                 }                             }                         }                      }                 }             }         }         }      private void ApplyConstraint()     {         // Check if the first node is clamped to the scene or is follwing the mouse         if (Node1Lock !=         {             RopeNodes[0].transform.position = Node1Lock;         }         else         {             RopeNodes[0].transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition);         }          for (int i = 0; i < TotalNodes - 1; i++)         {             RopeNode node1 = RopeNodes[i];             RopeNode node2 = RopeNodes[i + 1];              // Get the current distance between rope nodes             float currentDistance = (node1.transform.position - node2.transform.position).magnitude;             float difference = Mathf.Abs(currentDistance - NodeDistance);             Vector2 direction =;                         // determine what direction we need to adjust our nodes             if (currentDistance > NodeDistance)             {                 direction = (node1.transform.position - node2.transform.position).normalized;             }             else if (currentDistance < NodeDistance)             {                 direction = (node2.transform.position - node1.transform.position).normalized;             }              // calculate the movement vector             Vector3 movement = direction * difference;              // apply correction             node1.transform.position -= (movement * 0.5f);             node2.transform.position += (movement * 0.5f);         }     }      private void DrawRope()     {         LineRenderer.startWidth = RopeWidth;         LineRenderer.endWidth = RopeWidth;          for (int n = 0; n < TotalNodes; n++)         {             LinePositions[n] = new Vector3(RopeNodes[n].transform.position.x, RopeNodes[n].transform.position.y, 0);         }          LineRenderer.positionCount = LinePositions.Length;         LineRenderer.SetPositions(LinePositions);     }  } 

[ The layer 9 contains the circle collider objects and the layer 10 contains the box collider objects]

But, it is not working as intended ! Here is what I happens : Youtube Video

Can somebody help me please ?

Unity DontDestroyOnLoad not always working after Android build

I’ve been using this small script as a component to any object I want to not be destroyed at scene loading.

public class DontDestroy : MonoBehaviour {     void Start()     {         DontDestroyOnLoad(gameObject);     } } 

It has been working fine. It works for my GameOver canvas which I’ve been using for a long time whilst making the game.

Today I added the same script to a new AndroidControls Canvas I made. In the Editor it worked fine. Then I built it for Android to run on my physical phone (Galaxy S10). It gave me a Null exception.

It turned out to be caused by the AndroidControls Canvas being destroyed between scene loading (even though as I say, I tested in Editor for a few runs and it didnt get destroyed). And it gets a little weirder because after the attempted build to APK, and fail on physical device, it then failed to work in the editor. It continues to not work in each test after this in Editor, however if I remove the component and add it again, the entire process then repeats.

Please help as I don’t have a clue how to start fixing this. The only thing I can imagine it being wrong is it started as soon as I used this script on two canvas’s simultaneously. (I highly doubt I am correct but it’s the only thing I could notice at all that might be causing this).

This picture actually shows my DontDestroy component is attached to Canvas_AndroidControls, but in the Hierarchy you can already see that it is not in the DontDestroyOnLoad section (excuse the pink overlay for play-mode):

enter image description here

Maybe relevant, here are some of my specs:

Win 10 Unity 2020.3.5f1 (Just downloaded NDK/SDK for Android today via Unity Modules) Android 11 (Samsung Galaxy S10) 

Unity Cloud Build: Corrupted reffernces. Reimport All Assets possible?

When refferences in scenes or prefabs are missing usually a reimport all fixes all issues, but when those problems occur in a cloud build, that get’s it’s data from a git repository the solution seems much harder. The AssetDatabase API allows for a reimport in a prebuild script:

using UnityEditor; using UnityEditor.Build; using UnityEditor.Build.Reporting;  class Reimporter : IPreprocessBuildWithReport {      public int callbackOrder { get { return 0; } }     public void OnPreprocessBuild(BuildReport report) {         AssetDatabase.ImportAsset("Assets", ImportAssetOptions.ImportRecursive);     } } 

But the UnityEditor libary isn’t accessible in a cloud build. Is there a way to fix missing refferences in a cloud build or trigger a reimport via a pre build script or something similiar?

PS: Local builds after a fresh checkout of the github project do not have this issue, and only Cloud builds suffer from these missing refferences. Maybe someone knows the root of the issue and how to overcome it, so that none of these hacky solutions would be required.

Build up your traffic! Upload your videos to more than 220 tube sites now!

Upload Your Video To Hundreds Tube Sites In Just Minutes!

Auto creation of profiles on tube sites, Auto and Manual upload of  videos to hundreds of tube sites!

The Tube Sites Submitter is a fast and efficient tool for anyone who needs to upload videos quickly, easily and automatically to hundreds of tube sites in mere minutes. Tube Sites Submitter takes only minutes to create profiles on tube sites and upload your video automatically to the tube sites included in the database which is part of the Tube Sites Submitter.

The Tube Sites Submitter will:
– upload your video to hundreds of tube sites
– register your profile on hundreds of tube sites
– make sure your video is seen by tens of thousands of users
– increase traffic to your sites
– boost your earnings
– save you a lot of time
– make your work more efficient

The Tube Sites Submitter contains a database of tube sites and their rules.
BUY TUBE SITES SUBMITTER NOW! / TRY DEMO ( Watch this tutorial )

– there are more than 200 categories and a video can be uploaded to as many as 6 niche categories
– you can create an unlimited number of profiles
– proxy settings for individual profiles
– upload to hundreds of tube sites
– an easy-to-use password manager for your passwords
– attach descriptions of different size to the same video
– upload videos including the 2257 info
– upload videos including full video data (video duration, file size, format…)
– upload different video types (wmv, mpg, mp4, mov, flv, avi etc, etc.)
– upload videos with tags
– uploading videos with content-type information is fully supported

Start building traffic and making money right now!

How to build a specialized chat platform

I am building a website and I have hit a road block. What I am wanting to do is have customers create a profile that includes a survey. Once a customer answers the questions to the survey and creates their profile I want them to be routed to a chat feature where they become a lead to one of my employees. I need my employees to be able to access the info from the survey through the customers profile. I also need my employees to be able to add items to customers carts so the customer can make purchases. It would be awesome if we could get statistics to how many times the customer views the items we share and their cart. Any help or advice would be much appreciated.

Unable to hit hook with form submit build with “wp_ajax_{$action}”

I’m all I’m currently trying to build a hook using do_action( "wp_ajax_{$ action}" ) on a Form submit. I built the following form.

 <div class="layout-gutter bg-grey-lightest p-4">       <div class="bg-grey-light p-4">         <form action="http://localhost:8080/wp-admin/admin-ajax.php" method="post">           <input name="action" type="hidden" value="feedback">           <?php wp_nonce_field( 'feedback_nonce' ); ?>            <fieldset class="c-question">             <legend class="c-question__label">Was this page helpful?</legend>             <div class="c-question__container">               <div>                 <label class="toggle">                   <input data-type="boolean" name="helpful" type="radio" value="1" />                   <span class="toggle__label">Yes</span>                 </label>                 <label class="toggle">                   <input checked="true" data-type="boolean" name="helpful" type="radio" value="0" />                   <span class="toggle__label">No</span>                 </label>               </div>             </div>           </fieldset>             <div class="c-question">             <label class="c-question__label" for="client-0-email-address">Why or why not?</label>             <div class="c-question__container">               <div>                 <input required="true" type="text" name="description" />               </div>             </div>           </div>            <div>             <button class="btn text-inherit" type="cancel">Cancel</button>             <button class="btn-primary" type="submit">Submit</button>           </div>         </form>       </div>     </div> 

But when I submit the form I am unable to hit the action hook. I have the following file lib/feedback.php

<?php namespace FeedbackNYC;  add_action('wp_ajax_feedback', 'FeedbackNYC\feedbackHandler'); add_action('wp_ajax_nopriv_feedback', 'FeedbackNYC\feedbackHandler');  function feedbackHandler() {   echo "Hellow World";   echo $  _POST:   // Do some code here } 

But when I submit the form I’m not getting to feedbackHandler. The form has a hidden input field <input name="action" type="hidden" value="feedback"> but I never get to the hook. I tried echo in strings but nothing gets returned back. The request returns a 404 error as shown below:

enter image description here

How can I hit feedbackHandler on form submission?

DND 5E – Monk build help and touch mechanics – Also some item questions

first post/question here.

Right now I have a Level 13 Way of the Open Hand Monk (he hits 14 in the next long rest). And I am considering to multi-class after hitting level 17. Sacrificing the capstone and the +5 movement.

I currently have 20 DEX/WIS as a Variant Human. So my AC is 20, I have Bracers of Defense being made so when I attune to that I will have AC 22.

I do get my final unarmed die, my last proficiency bonus and my Quivering Palm when I hit 17, so I am thinking at this point is safest to multi-class.

My decision to do this is dependent on whether if the following setup works.

I wanted to take 2 levels in Fighter and 1 level in Cleric or just 3 Levels in Fighter with Rune Knight Archetype.

Fighter Level 2

Fighting Style: Mariner – This is mostly for the +1 AC for AC 23 with the bracers

Second Wind: Meh, can be useful, but this is just an added bonus.

Action Surge: Biggest reason I want Level 2 Fighter. Having a second action on a boss fight can be big, and with Quivering Palm, ending it in the same round on something that needs to die fast can be crucial. Or having 2 Quivering Palms in 3 turns.

IF I go Level 3 Fighter

Rune Knight – Fire Rune and Stone Rune would be my runes of choice.

Fire Rune does not cost a bonus action to invoke and can be invoked on a successful attack. It’s straight up 2d6 fire damage, but if it fails on a STR save, it is also shackled for 1 min and keeps getting hit with 2d6 until it finally saves.

Stone Rune can be invoked as a reaction on a target that ends his turn within 30 feet from me. It has to save on a WIS throw or become charmed for 1 min, leaving it incapacitated until it saves.

Giant Might – Also learned at 3rd level Rune Knight, for 1 min: become large, Advantage on STR saves/checks, extra 1d6 per turn on my unarmed/weapon strike (I also run Contact Poison when I can, can be 1d4/2d4/2d6 depending on potency added to Giant Might). This can be done as many times as my proficiency score. So at Level 17 Monk, 6 times before a long rest.

The Level 1 Cleric option

Inflict Wounds or Guiding Bolt – 3d10 or 4d6 with advantage on next attack… Since I am a Monk, I am confident I can make Inflict Wounds hit, especially since I have Stunning Strike. Guiding Bolt would be nice for advantage, but I have 2 other melees with me that we get advantage on enemies often, also knocking to the prone and Stunning Strike helps with advantage.

Shield of Faith – +2 to AC for 10 mins on a bonus action… With 20 WIS/DEX, +2 AC from Bracers of Defense, +1 AC from Mariner Fighting style, and Shield of Faith, I am looking at 25 AC. This will be one of my choices for a spell slot.

Cantrips for Cleric is kinda meh for me, I really just want the two Level 1 spell slots for the above. But I would go with Toll of the Dead and whatever else I decide on.


How does Inflict Wounds work? When I use a spell slot to do this and I go for the hit, does the hit use my Monk/Proficiency modifiers?

Does it count as an Attack Action? (I am new to Spells, as this is my first character in DnD 5E, with 2+ years in the making).

If it does hit, and is counted as an Attack Action, can I still use my bonus action to burn a Ki point and use Flurry of Blows after using Inflict Wounds?

How can I get a stronger Monk Weapon? I paid 6k Gold to get my bracers, but haven’t had much opportunity to get a strong weapon from any where in the game, so I had to pay for the bracers to be crafted…

Additional Info

Party make up is 1 Wizard, 1 Sorcerer (I think?), 1 Cleric (recent addition), Monk (Me) and a Ranger (when he shows up).

Feat: Lucky Weapon: Reg silvered quarter staff

16th Level Feat: Thinking Sentinel or Tough, since I only have 122 HP at Level 13 atm.

I have saved the party from dying with CC, high movement and high AC on more than one occasion. I want the new cleric to focus healing on the Wizard/Sorcerer/Ranger since they have lower AC than I do and I tend to disengage to assist when they are overwhelmed with something else that I am not already fighting. I was thinking of multi-classing into Ranger, but I don’t see a lot of good things from what I have read so far.

Our leveling system is based on Time Played and not EXP from kills, so more than likely we will hit Level 20.

Only have 3 levels to spare since I am going Level 17 WOTOH Monk. Any other suggestions I will consider.

Does Powerful Build apply to a goliath werebear’s beast and hybrid forms?

I am playing a Goliath Barbarian and recently have contracted Lycanthropy of the Werebear variety.

According to the MM on page 207 it states that a character who becomes a lycanthrope retains their class statistics but I don’t specifically see if it states that I can use my abilities while transformed. Maybe I’ve overlooked something.

My question is:

While shapechanged in Bear and Hybrid forms, does my Goliath ability Powerful Build still apply (also all other race/class abilities, i.e. Rage)? When transformed my size becomes Large; would I then count as Huge for all weight related rules, i.e. Carrying Capacity, Push, Lift, Drag?