How to make a flying pawn bank / roll when turning

Hi, I have a flying AI that follows a player and uses find look at rotation to turn towards them. When turning though, there is no roll to the pawn which doesn’t look very good. How can I add roll based on the direction the pawn is turning?

It’d be easier for someone to suggest a tangible pointer once you’ve explained how turning works atm. There’s a dozen way to achieve it.

AI that follows a player and uses find look at rotation to turn towards them

How is this done, precisely? Is it physics? Are we setting or adding rotation? Are we using control rotation? Some other way?

I am using set actor rotation

Yeah, that’s not helping much. Have a look the flying template - banking is implemented there.

Other than that, measure delta between rotators and use a clamped map range node to apply roll only. Depending on how the component hierarchy is set up, you may need to look into transform nodes that allow you to operate in either local or world space.

The way I’m doing isn’t helping much, or you need more info like my blueprint?

Also I don’t have a flying template, is there somewhere I can download it?

Could you show the script that rotates to the target? Are we ticking, is this a timeline, component? Also what moves the Pawn forward or in the desired direction. Choosing a right method for rotation will depend on how other pieces are working / behaving. Hence all the questions.

Also I don’t have a flying template, is there somewhere I can download it?

There are optional downloads:

Thanks

blueprint

Here’s a small, generic thing:

See if you can incorporate it into the existing system.

Instead for mouse, you’d use the location of the target, ofc. And you could run the above script separately from the main rotation (to keep it super snappy, for example), and interpolate roll only. Again, all depends on the fine detail of how it’s supposed to work.

Good luck!

2 Likes

Ok, thank you, that looks good. I need to go to sleep though, will update later!

worked perfect, thank you. Didn’t even know what a DOT node was before this