Download

Trouble with Move Component To and Rotation

Hi all,

I’m working on a climbing system and currently I am implementing the grab wall functionality. It works great except for one bug: The character model is not rotating to face the wall and is instead staying rotated in the direction it was pointing when I hit grab. This is how I’ve got it implemented:

  1. Do a sphere trace by channel (to a custom channel) starting from the player and going out a short distance
  2. Break the hit result
  3. Set up Move Component To. I have a macro that determines where on the wall the capsule component should move to (this works fine)
  4. Move Component To rotation: I take the Normal of the Impact point, convert it to a rotator, and plug it into the Move Component To node.

Ultimately, I can’t figure out why it’s not turning and snapping to the wall. I was pretty sure I had my math right. Could anyone possibly help me figure out where my issue is? I’ve included a screenshot of the bug, and the blueprint code below.

https://scontent-atl3-1.xx.fbcdn.net/v/t1.0-9/60963220_10108056486089153_3689738388891500544_n.jpg?_nc_cat=108&_nc_eui2=AeGalSt0p2j9tgMrmpPamlGbZEtBYLdkx5otobRFDO7kEzAnsHWbj-Bw6J1EO9zdy_0noEMCw8efqaQWSV1noA-wKvOy233s8iPfM0XcYVnllg&_nc_oc=AQk3poLaEWsXJHbVwvC7fGcIiXxQQwdmaakwek-h_VoMwf11d8fBNcCBbvXjC_TdkxQ&_nc_ht=scontent-atl3-1.xx&oh=d30bdd13f36ac3899412cd7f8b52d46b&oe=5D660835

https://scontent-atl3-1.xx.fbcdn.net/v/t1.0-9/60948493_10108056481144063_1332602045550559232_n.jpg?_nc_cat=107&_nc_eui2=AeHxGJ8KGSbzpkFACdCVQiW-0ATslPtT3CG7E62GYIKJvsxgnX4BEVzxjhDXc4hNsnhhtAp-BKwS4Zjwb_2rmvpxXYK7UlgqGV2SdRh3KsqXrw&_nc_oc=AQnu_xr1Uakn_jP6W7eAUiH5WHgp0smzR7Dz8Dh06iF81rkYQaii6V8d7QAbBt-wr3w&_nc_ht=scontent-atl3-1.xx&oh=d32bc9d6ca5e440d73d11c2d887119cb&oe=5D65DDD5

Thanks again!