I have a wheel, that I can rotate using my hand in VR.
The wheel can rotate freely, but the rotations its making is limited to min -180 max 180
The second you go over 180 degrees, it switches to -180. I would like this to continue, so that I can customize the wheel to allow rotations up to 1000 degrees, and if you go above 1000 degrees, it starts at -1000 perhaps. ( preferably stops, but thats another thing)
How can I do this? No matter how I’ve tried changing the numbers, It only really changes the output, be it from -180 - 180 to -360 - 360 ( but twice the rotational speed than what I am inputting )
Here is the current blueprint of how the rotation is done.
This is taking vector coordinates from a project to plane ( which is a point relative to the wheel base below the controller, and the wheel base location )
I am then setting the Relative Rotation of the wheel. The movement of the wheel is exactly how I want it, but I want the amount of rotations it does to be multiple instead of rotating to -180 degrees and then flipping to 180 degrees again.
Here it is in action with the output printed.
The output is the input rotation angle / 180 ( which is the max angle number )
changing this value will increase how many rounds it takes, but it will rotate faster than my hand is…
Code the mechanics only in terms of adding or subtracting rotation amounts. So never try and set an absolute value.
Use quaternions. I -think- ( can’t check right now ), that this is now available in blueprint. If it isn’t, then you can use a plugin, or switch to C++.
I’m unsure how best to code this to use addition / subtraction instead of setting the rotation, as I’m getting the rotation from a Find Look At Rotation.
It IS available in Blueprint, but I have no idea how to work with Quaternions.
Any idea how I can use the nodes to do what I’d like to acheive?
kinda hoping for a magical node that converts my rotation entirely in the way I want it to
Because I already had the relative position from the controller to the base of the wheel from a Project to Plane. And figured I could just use this position to rotate the wheel.
I can’t currently think of any better ways of implementing this.
I get that I can rotate it like this using addition and subtraction, but not without overcomplicating the calculation i’d think? I may be wrong here…
Sorry, I might be dumb and stupid. But I haven’t been able to find a better way to rotate it using add or subtract relative rotation. My results either has the wheel spinning too quickly/slowly or doesn’t feel like it’s accurately following my hand. The feel is very important.
I’ve been unable to upload the gif to the original post for some reason, but the hands in VR are moving in a circular motion and has the wheel following this. I Don’t want an inaccurate VR wheel here like most do, where you move the hand vertically or horizontally to turn the wheel based on the amount you moved it in these axes.
Maybe I’m just locked into this way of thinking, but this works, and it feels great in VR.
I’d like to continue using the same method of rotating the wheel, just converting the angles away from being locked at 180 and swapping over to -180.
I’m sure Im either being slow here, or not properly explaining the issue to you, but if you have an example of moving a wheel in VR using add / subtract ( or using add / subtract in general to set a wheels exact rotation based on degrees above 180 ) I’d love to take a look at it and learn how this is done.
Idk why the gif appears too big to upload… considering its well below 100MB…
I’ve uploaded it to google drive instead and linked it here and in the original post, in the event it makes things clearer. Thanks.
It’s up to you how you do the translation between the ‘hand’ and the object, but I’m line tracing from the camera.
Basically the idea is, keep a record of this trace point and the previous one, and figure out the angle between them, and if we’re going clockwise or anti-clockwise.
Thank you so much for the time and effort put into this. This worked flawlessly!
Now I just have to add the Delta Angles together to get the total amount rotated!
Brilliant!
( One thing to add, is that this, for me, also worked with AddRelativeRotation, Idk why it wouldn’t for you, or what the difference between the two nodes are )