# How to Slerp in wider angles

How do I get a gameobject to slerp in a wider angle? At first I thought the object wasn't moving from point a to b in an arc at all, but then I realized that it looked like it was slerping in a straight line because its distance to its target was generally close.... I am lost here.

Here is the code I am using

``````transform.position = Vector3.Slerp(transform.position, leader.position + leader.forward *2, Time.deltaTime);

``````

Any help is appreciated, Thanks

Slerp() treats the input as vectors, so the arc that's swept out will be determined both by the distance between the two points and by the distance from each point to the origin. This is unlikely to produce intuitive results. (For example, the farther from the origin the two objects are, the more 'straight' the path traveled will be in general.)

I'm not exactly sure what behavior you're after here, but this is sort of an atypical use of Slerp(). Not to say you can't use it in this context, but if you want to be able to determine the angle swept out by the arc yourself, you'll most likely need to shift the origin appropriately, perform the Slerp(), and then shift back (which, while fairly straightforward, does involve a little math).

You're using it wrong - it uses Vector3.zero as the pivot point, so you need to subtract the pivot point you want from both the start and end vectors, e.g. :

``````transform.position = leader.position + Vector3.Slerp(transform.position - leader.position, leader.forward *2, Time.deltaTime);

``````