UE3 - UDK Vehicle Stats.

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

bigshow

New Member
Sep 15, 2011
3
0
0
Hi guys, i was wondering if i could get the current data(speed, steering) from a vehicle? I looked around for quite some time , wondering if there is any way i could access these data from udk itself? Edit: I need to display the speed.

Thanks.
 
Last edited:

EvilT-ModZ

Un-Gravitify
Aug 3, 2011
42
0
6
30
Russia
www.set-games.ru
So, try it
code for your vehicles's hud
Code:
var YourVehicleClass Car;
var float CarsSpeed;

// (im not sure what function uses in ut3's hud)
// write new hud content
simulated event PostRender( canvas Canvas )
{
        CarsSpeed = VSize(Car.Velocity);

	Super.PostRender(Canvas);
	Canvas.Style = ERenderStyle.STY_Alpha;
	Canvas.SetDrawColor(255,255,255,255);
	Canvas.Font = Canvas.MedFont;
	Canvas.SetPos(0.703*Canvas.ClipX, 0.056*Canvas.ClipY); // 0.703 and 0.056 are coefficients of screen location
	Canvas.DrawText("Speed: "$CarsSpeed);
}
 
Last edited:

kiff

That guy from Texas. Give me some Cash
Jan 19, 2008
3,793
0
0
Tx.
www.desert-conflict.org
if you want the input to the steering then use: myVeh.Steering

if you want the actual wheel's steering/rotation: myVeh.SimObj.ActualSteering
probably need to do a typecast there, like: SVehicleSimBase(myVeh.SimObj).ActualSteering