I’m using a modified ThirdPerson template and, by extension, a modified ThirdPersonCharacter class. If you’ve seen me on here over the past few months, you’ll note that I had a hard time getting rope-swinging physics to work properly. Well, the good news is that it finally works. I simulate an equal but opposite force in the direction of the focal point of the swinging motion by calling GetMass on the Character’s CapsuleComponent, multiplying that by delta time and a small elasticity multiplier, and then multiplying that product by the vector that represents the direction that the tension force would be applied in and adding an impulse to the CharacterMovement component. I hope I didn’t lose anyone, because some of that math is still hard for me, and it’s been a while since I took a linear algebra course in college.
Now, all of that works well, and I get a nice swinging motion. Annoyingly though, I get a repeating warning in my message log that says:
! ThirdPersonCharacter_C_1.CollisionCylinder has to have 'Simulate Physics' enabled if you'd like to GetMass.
Well, naturally, I tried to turn on Simulate Physics even though everything appeared to be operating fine, since no one likes seeing warnings in their logs. The only thing I can see in my editor that looks like a CollisionCylinder to me is the CapsuleComponent section, which has a Simulate Physics checkbox. When I check that, save, and run the game, no input moves my character, presumably because he’s too heavy or something and the collider needs to be free to move around; I’m not quite sure. If I try to get the mass of the mesh instead, no force is applied, which leads me to believe that the mesh has no mass. What can I do to make this message log shut up about this warning? If something is truly wrong that I need to fix, am I looking in the right spots?