How can i get an actor to wiggle or vibrate in one axis with scripting? I have a shock absorber that i would like to vibrate up and down based on velocity and terrain. I suppose the easiest thing to do is just randomly wiggle it in one axis. How can i do that with a blueprint ?
welcome @ocd65! depending on your skills… there are a whole bunch of ways you might approach this… a few are:
- vector and float Spring interpolation functions in BP
- sphere/box/line trace to measure the distance to the ground, compressing the shock absorber as needed
- a physics constraint, physics handle or just a spring arm
The absolutely simplest/highest performance way to do it would be to put each wheel on an individual spring arm, set DoCollisionTest on. The SpringArm will go to it’s full extent automatically, then retract as the distance to ground beneath the vehicle changes. The shock absorber (like maybe a static mesh component) could be scaled to fit the relative distance between the wheel and the vehicle (it needn’t necessarily have collision or physics, just a visual effect)
You’ll find a bunch of material on YouTube and Google… some really advanced stuff.
thanks for the breadcrumbs!
everything i read up on about ‘spring arm’ seems to be regarding using it for a camera. how do i put a wheel on a spring arm ? seems like most of the spring arm parameters have to do with a camera.