Vehicle turning

Vehicle turning behaves strangely. While turning, vehicle should move in turning direction, in game it seems it is other way around.

For example, if I am parking with wall on my left side, turning right should be safe, as my front is moving to the right side and back of the vehicle is dragged behind. In game though, when you start your turn right, back of the vehicle swing wildly to the left right into the wall. The longer your vehicle is, more apparent and annoying it is.

Please, make it behave more realistically.

Well right now i think it moves the entire vehicle at a time, maybe let the player choose wheels to turn and then turn those and the frames attached then pull the frames behind like a trailer? If trailers get implemented this wouldn’t require too much work I don’t think.

The OP makes a good point.

The problem is, I think, in how the game handles the turning geometry. Right now, a vehicle attempts to turn itself around its center of mass when moving - when that is plainly wrong. A moving vehicle with front steering will turn around its rear axle’s center. In the absence of immediate options for defining the “steering pair”, we could assume that the frontmost wheels are always ones doing the steering, and determine the actual rotation point for the vehicle by finding the geometric center between the remaining wheels. If we swap the center of mass for that determined point in whatever function is handling vehicle rotation now, do you think it’ll work better?

Just to point one thing out, the effect you’re seeing is exaggerated, but nothing we do is going to eliminate it entirely, as this is something that actually happens with large vehicles.
Someone better than me at geometric translations might say otherwise*, but this would be difficult to extremely difficult to implement. Considering the fact that it wouldn’t fix this issue, I don’t see it happening soon, PRs are welcome though.

*and they can feel free to give me a solution that works to prove their point.

[quote=“Kevin Granade, post:5, topic:5588”]Just to point one thing out, the effect you’re seeing is exaggerated, but nothing we do is going to eliminate it entirely, as this is something that actually happens with large vehicles.
Someone better than me at geometric translations might say otherwise*, but this would be difficult to extremely difficult to implement. Considering the fact that it wouldn’t fix this issue, I don’t see it happening soon, PRs are welcome though.

*and they can feel free to give me a solution that works to prove their point.[/quote]Like I said, right now the problem is that the vehicle tries to turn on its center of mass - or maybe even “central part” - when moving. If you have an extremely long vehicle like a fire truck, turning at low speed creates a ridiculous effect where the entire rear half of your truck whips out in the other direction, wheels and all. If it will treat all front wheels as “turning” wheels and, instead of center-of-mass or the central part, treat whichever part lies closest to the centerpoint between all non-front wheels as the axis of rotation, I think we’ll see much more sensible turning.

As it is, the rotation of the vehicle works great. The only problem is that it turns like a bad 3D animation right now.

[quote=“Kevin Granade, post:5, topic:5588”]Just to point one thing out, the effect you’re seeing is exaggerated, but nothing we do is going to eliminate it entirely, as this is something that actually happens with large vehicles.
Someone better than me at geometric translations might say otherwise*, but this would be difficult to extremely difficult to implement. Considering the fact that it wouldn’t fix this issue, I don’t see it happening soon, PRs are welcome though.

*and they can feel free to give me a solution that works to prove their point.[/quote]

I suck at math, but I can’t imagine real life situation where vehicle, no matter how long, parked along the wall on one side, would collide with the wall when turning away from it… part of the vehicle that could rotate that way is 1) short 2) dragged away while rotating.

[quote=“Robik, post:7, topic:5588”][quote=“Kevin Granade, post:5, topic:5588”]Just to point one thing out, the effect you’re seeing is exaggerated, but nothing we do is going to eliminate it entirely, as this is something that actually happens with large vehicles.
Someone better than me at geometric translations might say otherwise*, but this would be difficult to extremely difficult to implement. Considering the fact that it wouldn’t fix this issue, I don’t see it happening soon, PRs are welcome though.

*and they can feel free to give me a solution that works to prove their point.[/quote]

I suck at math, but I can’t imagine real life situation where vehicle, no matter how long, parked along the wall on one side, would collide with the wall when turning away from it… part of the vehicle that could rotate that way is 1) short 2) dragged away while rotating.[/quote]On the contrary, that I can imagine. Just not with a regular car.

Picture a truck, with a single rear axle supporting the long cargo deck.

===== """"" <-axle +#o#+ |"""| |HHH| |HHH| <-axle |HHH|
If it’s parked parallel to a wall, the front will move away… but if the platform is long enough and the wall is close enough, the rear will scrape along the wall:

[code]#<-wall

>>> turns right

#===== ->moves right
#""""" <- steering axle
#+#o#+
#|"""|
#|HHH| ->moves right
#|HHH| <-axle
#|HHH| <-moves left
#^scraaaaape
#[/code]
Kinda like that.

edit: on the other hand, what happens now is this:

[code]#<-wall

>>> turns right

#=====
#""""" <-axle ->moves right
#+#o#+
#|"""| <-center of rotation
#|HHH|
#|HHH| <-axle <-moves left
#|HHH|
#^SCRAAAAPE
#[/code]

Yea, but the vehicle is moving forward (in direction it is rotated) at the same time it rotates, making some sort of curve motion, you would have to rotate on the spot to manage to scrape against the wall.

I guess it could happen if:
a) you could turn in extreme angle
b) part of the vehicle behind the rear axle would have to be long
c) if you park really close
and combinations…

Edit:
I cannot test it right now, but I wouldn’t be surprised if the center of rotation in game is where the driver is sitting :frowning:

That seems like it would get a much closer approximation of how it works in real life.