ausmel105
|
  |
| Joined: 05 Oct 2010 |
| Total Posts: 251 |
|
|
| 04 Jul 2015 05:35 AM |
Hi all,
Today I am attempting to steer a vehicle using body angular velocity at the rear axle, however my efforts are proving unsuccessful as the rear wheel also powers the vehicle's movement forward.
I have drawn a diagram for ease of understanding, red = wheels: https://twitter.com/ausmelRBLX/status/617044695038959616
I understand the the y axis would rotate the vehicle in the desired manner, so this is what the relevant code reads so far: local dir = seat.CFrame.lookVector v.BAV.angularvelocity = dir * newThrottle if v:FindFirstChild("Rear") then v.BAV.angularvelocity = v.BAV.angularvelocity + Vector3.new(0, steerValue, 0) end
--main loop which is incorporated into a larger function, I have just pasted the relevant lines.
if seat.Steer == 1 then steerValue = -0.5 elseif seat.Steer == -1 then steerValue = 0.5 else steerValue = 0 end
What could I do to achieve my desired effect, my current effort obviously isn't working. Any advice or suggestions are appreciated. |
|
|
| Report Abuse |
|
ausmel105
|
  |
| Joined: 05 Oct 2010 |
| Total Posts: 251 |
|
| |