How to slow down a position transform that is being manipulated by hslider GUI input????
My problem is that I'm adjusting a 3D in game object's position transform based on a GUI slider value. It works like a charm most of the time. The object being adjusted (using its position adjusted from hslider values) is a simple box with box collider and no rigid body element. This box moves rigid bodies in the scene.
//this is used to transform the position
transform.localPosition = Vector3(positionX,positionY,limitControl.hSliderValue);
Everything is fine if I adjust the slider value slowly. If I move it quickly, it goes right through the rigid bodies it is supposed to manipulate.
Why not use torque or addforce to adjust the box? Because I need it to move within a specific range of transform coordinates. I really just need to slow down the movement of the "t`ransform.localPosition`" or find a more reliable way to detect collisions. I've tried a variety colliders on the box being transformed with hslider and elements in the scnee (rigid bodies) that is pushes. I've also tried a wide variety of editor settings for rigid bodies within the scene.