# Physics bodies c++

**URL:** <https://forums.unrealengine.com/t/physics-bodies-c/491017>\
**Category:** World Creation\
**Tags:** physics-constraints, physics-stability, Physics-Bodies, unreal-engine, Physics, Scripting, CPP, question\
**Created:** [November 17, 2021, 10:13am UTC](https://forums.unrealengine.com/t/physics-bodies-c/491017 "2021-11-17T10:13:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GigiK-K-K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GigiK-K-K](https://forums.unrealengine.com/u/GigiK-K-K)\
**Post date:** [November 17, 2021, 10:13am UTC](https://forums.unrealengine.com/t/physics-bodies-c/491017/1 "2021-11-17T10:13:21Z")

</div>

Can physics bodies drive the character manually with c++  
I am trying to create mechanical movement of the character without animation, sort of procedural physical animation.  
So I saw there is a physics body next to the skeletal one.  
I’m still new to unreal.

This body is made of capsules"called aggregate physics bodies" shown in the image below.

As I understand these capsules are tied - binded to the bones(skeletal mesh parts)

If I move one of these capsules by code will it move the body, or move the skeleton arm bone and the bone move the arm for example of the character in a mecanical way.

Let’s say I create an actor class and use a function, something of the sort that is meant to respond to key bindings.

```
void AMovement::ForwardMove(float value)
{
     if (value)
     {
         AddMovementInput(GetActorForwardVector(), value);
     }
}

```

Or I can use anything else, a function with a Frotator with a vector to move things, spin things just for testing to see if components of the character are moving like arms legs and so on in a mechanical way.

So I press a key binding (keyboard button) and the capsule that I called (invoked) in my C++ code moves forward and moves the bone and the arm with it ?

How would I get access to the capsules ? with C++ This is the hard part, how to call on these components, are they components, they fall under some UComponent class ? This is the hard part, the rest I can manage once I know how to call on what I need, I can create some functions with various parameters to try to create a mechanical locomotion system.
