# MakeShortestRotationBetween isn't working when given vectors, syntax error?

**URL:** <https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [July 1, 2023, 3:13pm UTC](https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462 "2023-07-01T15:13:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TTVTROOFTH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TTVTROOFTH](https://forums.unrealengine.com/u/TTVTROOFTH)\
**Post date:** [July 1, 2023, 3:13pm UTC](https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462/1 "2023-07-01T15:13:16Z")

</div>

`Print(MakeShortestRotationBetween(vector3{X:=-7616.0, Y:=-3840.0, Z:=-100.0}, vector3{X:=256.0, Y:=576.0, Z:=-100.0}))`

That code is throwing the error:

```auto
This function parameter expects a value of type tuple([]char,?Duration:float = ...,?Color:color = ...), but this argument is an incompatible value of type rotation.(3509)
(/UnrealEngine.com/Temporary/SpatialMath:)vector3<computes><concrete><native><public>

```

Am I inputting the variables incorrectly?

---

<div class="post-metadata">

**Author:** ![ManualPotato](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manualpotato/32/1144902_2.png) [@ManualPotato](https://forums.unrealengine.com/u/ManualPotato)\
**Post date:** [July 1, 2023, 3:26pm UTC](https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462/2 "2023-07-01T15:26:57Z")

</div>

I’m not getting any type errors doing this:

```auto
using { /UnrealEngine.com/Temporary/SpatialMath }

MakeShortestRotationBetween(vector3{},vector3{})

```

Is this the only type error you’re seeing on all your Verse scripts?

Edit: I blanked on the Print in your snippet, woops

---

<div class="post-metadata">

**Author:** ![Ep8Script](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ep8script/32/1170494_2.png) [@Ep8Script](https://forums.unrealengine.com/u/Ep8Script)\
**Post date:** [July 1, 2023, 3:30pm UTC](https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462/3 "2023-07-01T15:30:01Z")

</div>

You’re passing the rotation directly into `Print` - you need to convert it to a string by doing `Print("{Rotation}")`

---

<div class="post-metadata">

**Author:** ![TTVTROOFTH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TTVTROOFTH](https://forums.unrealengine.com/u/TTVTROOFTH)\
**Post date:** [July 1, 2023, 3:36pm UTC](https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462/4 "2023-07-01T15:36:27Z")

</div>

oh okay thanks, I’m just learning the syntax

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 31, 2023, 3:36pm UTC](https://forums.unrealengine.com/t/makeshortestrotationbetween-isnt-working-when-given-vectors-syntax-error/1216462/5 "2023-07-31T15:36:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
