before i start, i have almost no programming experience and my understanding of blueprints is extremely basic.
Hi all,
I want to make an object rotate around on its own axis based on my mouse X/Y input.
I’m following a tutorial on youtube that shows a simple setup that works.
However, instead of the object rotating immediately when moving my mouse, i want to have a delay/smooth/damp (don’t known the correct term) when the object rotates. as if its smoothly following my cursor. After some searching around i found that Rinterp should do the trick, Unfortunately i cant seem to make it work. Now i think the reason it doesn’t work is because my current rotation value is the same as the target value, But how do i create a delay between these two values?
I’ve been banging my head over this for quite a while now even though the solution is probably quite simple, any help or tips are very much appreciated!
Rinterp works when one pin is the current position and the other is a fixed target position.
You’re right, in that interp will provide a smooth acceleration and deceleration between two values, but the target value must be known at the start.
What you have here is an incremental process, that’s why interp is not working.
If you want to see the correct effect, you’ll need to take mouse input as an indicator that the object must rotate by 90 degrees ( say ). Then you know where you’re going.
What would be the best way to turn the mouse input into an indicator? and would this still allow me to rotate the object around in realtime based on my mouse input. Maybe there is a better way to lerp/smooth the rotation while moving my mouse around?
Like I say, it’s really the fixed target that’s the main thing. There’s a million ways you could setup the input depending on whether you’re talking to a blueprint or it’s all happening inside a blueprint or…
Your example works pretty well! and got it to work with the Y input as well.
However, when i remove the clamp the rotation flips out and i kinda want it to have no limit to how many times it rotates around. Maybe i’ll just have to tinker a bit more. But this is a great start!
sorry i’m a 3D generalist, i know everything from modelling, animation to shading. But programming and blueprints goes way over my head but i’m slowly learning :’) . However i tinkered around a bit and found a fix!