Download

How to turn an object gradually to a mouse click around an object rather than snapping to it?

Good Afternoon all,

I am very very new to Unreal and i am trying to learn.

I am trying to have an object, at current just a cube, rotate to another point where i have clicked my mouse. Currently the cube snaps to face the location i have clicked, rather than gradually turning to it via a definable turn rate.

It would be nice to have the ‘cube’ tip slightly as it pivots in the direction of travel like a plane, but one step at a time. My current code is below if anyone can advise?

Look there:

https://www.unrealengine.com/en-US/b…validated=true

http://romeroblueprints.blogspot.com…interp-to.html

Thanks for the pointers Nawrot.

I’ve read through those and given it a go but no joy yet. Still snapping to where i click but ill keep trying.and see where i get to. Teach a man to fish and all that.

Did find an old game that does exactly what i want to happen though as reference

Star Trek Starfleet Command Has the same movement interface i am trying to create. Forward motion is set by a slider but rotation is done by a mouse click and the ship turns to that direction with a slight roll for effect.

Either use a timeline (more smooth, but more complex) or use the “rinterp” node with a timer (better than event tick). It allows you to rotate an actor rather smoothly.

Or use a “vinterp” node if you want to rotate smoothly to a location. You have to try both.

Thanks everyone for all the guidance. I have managed to get it working with the below code. Whether it is the most robust and efficient code, I doubt it but it works.