x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to get started with tracked vehicle movement logic using physics?

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.

Product Version: UE 4.14
Tags:
more ▼

asked Jan 24 '17 at 06:00 AM in C++ Programming

avatar image

GhostRavenstorm
101 33 36 41

avatar image GhostRavenstorm Jan 25 '17 at 12:49 AM

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.

alt text

avatar image GhostRavenstorm Jan 26 '17 at 04:45 AM

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?

avatar image GhostRavenstorm Jan 28 '17 at 05:24 AM

https://www.youtube.com/watch?v=LG1CtlFRmpU

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.

avatar image GhostRavenstorm Jan 28 '17 at 05:27 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Oct 10 '17 at 06:30 PM

avatar image

Placid_Storm
13 1 4

avatar image Placid_Storm Oct 10 '17 at 06:38 PM

This also looks useful. UE4 Vehicle User Guide There seems to be no easy answer.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question