Rotate a mesh around it's center using quaternion
I would like your help if possible as i don't know a lot of quaternion me myself.
so i have a cylinder and i want to rotate around the up vector as its axis of rotation when i press up or down arrows or swipe on touch.and i want to rotate it around the right vector when i swipe left or right, or pressing left and right keys on keyboard.
My current setup is this
and this is the cylinder i want to rotate.
So basically, i want when i press the up or down keys (or in case of mobile to swipe up or down) is to rotate around the green arrow and when pressing left and right i want to rotate around the red arrow.
I use quaternion bleuprint plugin found here https://www.unrealengine.com/marketplace/blueprint-quaternion-library
you can check the photos of the plugin for all of the available nodes.
i would appreciate any help.
asked Mar 04 '19 at 01:34 PM in Blueprint Scripting
i was able to solve the problems using those nodes.
This was used with quaternion plugin to find the quat at the y axis and to rotate the object around it
answered Mar 05 '19 at 08:45 PM
This tutorial will show you how to use quaternions for rotations.
Haven't bought that quaternion plugin so I can't say for sure what to use from there but the nodes should largely be similar. Looking up in the FQuat API there is a C++ function "Make From Euler" this is probably what you will want to use as a blueprint node if the plugin has make that accessible to you.
answered Mar 04 '19 at 03:09 PM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here