How to obtain 'wheel angle' from Sedan_front_wheel

Hi All,
Not sure if this is the correct place for this but I am having issues which I am struggling to solve, to give context, I am building a simulation environment for a university project based on autonomous driving. I am using the basic sedan (template provided when starting a new project) as a starting point and I am eliciting data from the vehicle to then use in the construction of PID controllers. One of the variables I need is the angle at which the front wheels are pointing, which I believe I can obtain from the ‘get steer angle’ function within the ‘Sedan_front_wheel’ blueprint class. I am attempting to set a variable type to ‘vehicle wheel’ (the parent of ‘Sedan_front_wheel’) as the object reference shown in the first image.

I believe the issue is the fact that I do not have a default value which I have highlighted with the red box, however I do not seem to be able to set this value as the drop down box to set it contains no assets which I can set the value to.

For reference the ‘Sedan_front_wheel’ details are:

294503-unreal-issue-2.png

Can anyone help? I am new to unreal engine and have spent far far too long trying to achieve this for what probably is something annoyingly simple.

Or is there a better way to obtain this data?

Thanks,

A

Are you in the sedan BP? If so, isn’t the wheel a component in that BP? ( I don’t know ). Then you have an actual reference…

If it’s not, then you will need to search for the wheels ( probably using GetAllActorsOfClass ).

No outside of the sedan BP, the wheels are seperate, I am not able to search for the wheels. I have been able to create a new variable with the type ‘object’ and then set the default variable to ‘vehicle wheel’. However the cast then fails. Any ideas?

If the wheels are in your level, then you can find them with getallactorsofclass, no casting. Creating a variable is no use unless you can set it to reference an actual wheel :wink:

When the game is running, look in the details panel, you can see all the actors there. There wheels will be there…

The wheels aren’t there, the only thing close to it is the sedan pawn but not specifically the front wheels. Cannot find the sedan_front_wheel or vehicle wheel BPs either using the getallactorsofclass as they dont seem to be listed

Ok, then I’m assuming the wheels are children of the car ( I have no idea though ).

Can we see the component list in the car?

Or maybe it works like this:

How did you finally managed to get the wheel you want?