I’m prototyping an arcadey tank game and I’m not sure how to get started on how the treads would deliver locomotion using physics. I have a basic understanding of how tread logic works: if full Y+ axis, drive forward with no rotation, if full X+ axis then rotate clockwise with no forward movement, etc. The problem I have is I’m not sure if this is programming for the physics I have in mind where I like to have both tread components provide torque via physics and its not just the tank as a whole being translated. For example, if only the right tread has x amount of torque and the left tread has zero, then physics should cause the tank to move forward while turning left. I’ve looking into perhaps modding the wheeled vehicle component for my purposes, but that has a lot of extra things I don’t need like gear changes and suspension. My goal is to simulate how treads would drive a tank while still having some physics without it being too much like a tank simulation.
Should I use the MoveUpdatedComponent() function in UMovementComponent? I’m not sure how I could use it to propel my tank using the treads like how I invision it.
I guess it would be better to ask how do I even get movement at all? I have little understanding of how movement components work.
Okay, I figured out how movement even works, but I’m totally stuck on rotation. Where and how in the engine API do you script an object to rotate around an offset pivot?
This video is a good start fro me, but there’s still a lot I don’t understand about using these physics components mentioned in the video.
I have lots of questions I can’t seem to find answers to. Like, what functions in the engine API are moving an object with physics? I know for sure its not Add Actor Local Rotation or Add Actor Local Offset, but is Add Input Vector in a Movement Component moving with physics? I’m not having any luck getting my thing to collide with other things.
I intend to look over this VihiclesTechnicalGuide at some point. I had a nerdgasm when I saw it. It gave me a lot of information but nothing that I could use. I just browsed it though. Add Actor Offset using the input of “AxisInput” “DeltaTime” and a turn speed all multiplied together seems to do well enough though. It isn’t really using physics though.
This also looks useful. UE4 Vehicle User Guide There seems to be no easy answer.