Download

Physics character or vehicle or ...

Fellow members, tell me please, how did you do behavior vehicles(machinery) in your projects? Did you use character with the physic of UE or Vehicle BP, or another? I want in my strategy setup behavior of tank, for example. For organic it simple, character + animation + move to …(in BP). For vehicles, this logic is unnatural.
I hope very much for your answer, it does not give me rest.

I would go with Pawn if you are planning to control it directly because Pawns can be possessed by player controller or ai controller. Otherwise you can use Actor. Vehicle class is very specific to driving a 4 wheeled vehicle as in GTA, for strategy that would be an overkill. Otherwise vehicle class behaves like Pawn - it can be possessed.

Thx for your answer. I mean somewhat different, how to set navigation, for example. For instance - I have a tank mesh, I want realize movement. Tank move to point. If I do it with in pawn with character class, logic is works, but unnaturally. I have tried to do this through character the inclusion of physics, but it I can not move. Like you said, through a vehicle is laborious. Not in a search engine, not on YouTube, I have not found an example. Is this possible through a character with complex animations? I just do not know how this should be done technically correct. Many thanks and sorry for my english, it’s not my native language.

I did something like your project before, I did with Character class I think it’s be good for you have physics that they are not too complicated also you can modify them.

My friends, many thanks for your answers. With physics I could not :frowning: Plz, watch it. After 8 minutes, I describe the behavior of worker Development GW: GENERALS 2 - Краткий обзор и наши задачи - YouTube. It is for you to understand what I’m saying. And after 11 min here my vehicle Development GW: GENERALS 2 - Краткий обзор и наши задачи - YouTube. How do I implement a realistic behavior for it? I understand from my reading the best option is a system of complex animation or not?

Ohh I see, this is rather easy. I did this for ship unit in strategy prototype.
For wheeled vehicle I would do like this - You know the direction where your unit is currently looking and you already storing the location where it needs to move. On every frame, calculate needed rotation by interpolating between unit current rotation and FindLookAtRotation(Unit_location, Target_location). Speed of interpolation will define speed at which unit can turn. Stop interpolating when difference between rotators is smaller than some epsilon.
For something like a tank, you can first measure how much is the difference between your current rotation and rotation to target. If difference is small, then threat is like vehicle. If difference is big then do a “neutral turn” first - rotate tank in place until faces the target and start driving only after that.

I understand what you mean. Many thanks, I will try.