Is there any way to control vehicle tilt?


(SphereCow) #1

My vehicle tilts to the right whenever I turn left. However, I would like it to tilt in the direction it is moving. Is there any way to achieve this?


(Azuvector) #2

More detail? Is this a vehicle you’ve created, or one of the BaseETQW ones?
If the former, what sort of suspension/engines/etc does it have? What sort of movement type? (Wheels, legs, hover, etc.)
Explain in a bit more detail?


(SphereCow) #3

My own.

Vertical suspension on the front wheel, and knee suspension on the rear. A few simple parts. The center of mass is between the wheels. so that it does not flip so exaggeratedly.


(SphereCow) #4

Is the only way to modify how the vehicle is controlled through code?

If you modify the vehicle_control key in a def to different vehicles, like hog, anansi or titan, the controls become vastly different.

Is there any way to splice them?


(SphereCow) #5

This is pretty bad actually.

You can’t:

A: provide individual masses to AF bodies.
(you can only do totalmass)

B: constrain a vehicle part to a joint, even though it says that you can in the wiki
(every type of vehicle part has a super rigid set of keys it may accept that are coded in, rather than every type of part inheriting common keys. Say for instance “HEALTH”, or “JOINT”, or “DEFBROKENPART”)

C: script how vehicles receive their input as in, a car with rotor controls, or the mouse controlling yaw and pitch.
(coded into the game)

D: animate rotations or tilting
(wheels and parts/bodies don’t follow)

Gotta say, I’m pretty upset by all of this. The coding of the vehicles, and mostly everything prevent any real creativity.


(Azuvector) #6

Don’t really have any answers for you on the subject of tilt. But this particular point is definitely one of the most frustrating things with working with ETQW: to really do anything more than minor tweaks, you need to write something in C++(An issue for non-programmers.) and then you typically need to script the C++ features into the game’s script files(An annoyance for programmers.).
But you probably can do what you’re looking for, if you take that route.

The various vehicle movement types are defined in code, rather than script. (Still haven’t really deciphered them; vehicle horns are tied up with them, and the Desecrator’s lack of a horn is a pet peeve of mine. XD)

I’ve noticed some funny quirks in how mass works in ETQW, not really any pointers to it, but the global mass of a vehicle almost always seems to be the same for every vehicle(or I’m doing something wrong with my gravity weapon stuff.).
There seems a lot of quirks and strangeness in the whole vehicle vs vehicle parts setups, too.

Not sure if it’s of help to you, but the Icarus’ does appear to use rotating parts; its jets have little propellers inside them. Not sure if that’s what you mean though: kinda thinking you might be referring to rotating something and having an attached part rotate around the rotating object, in which case I’ve no idea. Suspect it probably can’t though, at least by default, due to some of the funkyness that seems to go on with rotating objects in ETQW(There’s a few threads by some of the mappers about that.).


(SphereCow) #7

Don’t think I can get it to work outside of the code. I would need to rotate the ENTIRE vehicle, rather than joints, since none of the masses/parts follow joints.

I tried a script that rotates the vehicle based on the y axis input (left or right) and that didn’t work.

Tried another where the weights of the vehicle were in different “parts” that were on the left or right side. With specific input the parts would become disabled. The disabling of the parts worked, but the vehicle retained the total mass none the less.

TBH, that, or mass rigged to joints would have been my best bet, but it looks like I have to get someone to mod the code, which is the worst case scenario. It doesn’t seem that complicated, because I already found where the code that controls the vehicle tilting is. : \ Too bad that’s beyond my expertise.

Also, your should try commenting out the “mass” section in any vscript. That’s where all of the vehicles’ center of masses lay.
If you add way too much mass to the tormentor’s nose and reload the script it will tumble forward, but if it has a mass definition that won’t change.


(SphereCow) #8

Nevermind. I hacked something together through script that basically gets the job done.

get/setAngularVelocity as well as get/setLinearVelocity, getAngles and sys.angToForward saved the day.