Download

Newb Physics Question

Hey folks, a new guy here to the world of game creation. I’ve picked up alot over the last few weeks, but need some advice/a push in the right direction.

I am creating a racing game and I have my vehicle physics ironed out somewhat decent, but I have a situation where I want to temporarily adjust the position of a given object(s)…

The race car I’m dealing with, in reality, when the car (a dirt track car) is at the top range of its RPM range, the rear axle will shift forward slightly and the rear end of the car will shift up slightly. So I was thinking of doing some coding like (if engineRPM > X, add Y to the X-axis of the rear wheels and maybe add some to the rotation of the car body?

Could anyone point me in the direction of a good way to accomplish this?

Any help would be greatly appreciated!

Ok, so I thought I found a decent method, but alot of things are unclear…

I created the conditional logic portion in my Vehicle Blueprint graph and set it up to execute a function located in one of my Wheel Blueprints, but now I am stuck.

In my Wheel Blueprint, how would I go about accessing/setting a value? For example, my Wheel Blueprint has a Wheel>Offset>X parameter under the Class Defaults. How would I access a value here when my function executes?

Dare I suggest Movers? Probably not lol. Way beyond me, I barely cope with movers which are pretty simple.

Thanks for your response. I was getting worried I’d done something wrong lol.

I’m getting closer. I’m just struggling with accessing parameters to write values to them in my blueprints. I’m still new to C++, but not programming as I have a background in Java. If possible, for simplicity sake, I’d like to keep as much of the programming on the graph as possible. I just have to figure out the limitations of the blueprint.