How to use something like SLERP but with continuous physics

Hey there. I am having a little trouble with my slerp function at the moment. When you hold down the X button on the controller you can zap a target towards you and when i reaches abotu 5 meters away from you it stops and you can then control the object around you in an arc by using SLERP and the controller joysticks.

The only issue i am having is that the physics are gone as soon as it enters the SLERP function. I have seen some pointers on the forums saying that because I am directly changing the objects position the physics are cancelling out. Is there any way to use something like SLERP for the arc type effect I am trying to achieve but with Physics attached?

Here is a quick diagram to illustrate what I am trying to do:
[10715-slerp+help.jpg|10715]

And here is my SLERP function:
//controls the arc that the object is kept in
void slerpFunc()
{

		float damping = 2;
		//limits the Slerp function to the centre point of Roybot
		
		//sets up 3 vectors the start position and the end position for the interpolation
		//and the center point 
		Vector3 centre = transform.position;		
		Vector3 startPos = transform.position + new Vector3(0,0,5);
		Vector3 endPos = transform.position + new Vector3(0,0,-5);				
		centre -= Vector3.up;		
		Vector3 startRelCentre = startPos - centre;
		Vector3 endRelCentre = endPos - centre;
		
		//I am overriding the physics with transform.position. Need to find a better way to do this!!		
		target.transform.position = Vector3.Slerp(startRelCentre, endRelCentre, rightThumbValueY/damping);
		target.transform.position += centre;
	}

If anyone has come across this before or can help in any way it would be much appreciated!

Cheers :slight_smile:

If you want to maintain physics you have to do it physically
A simple trick can be creating a high gravity source like a magnet object which can be controlled by your slerp and then assigning the rgidbody you want to controll to be affected by that magnet. Tell me if it worked :wink: