Restrict character movement within cylindrical space

Hello world, :wink:

This is my first post and i must say, I truly am amazed by the power and capabilities that unreal has to offer. I am fairly new to unreal (close to a month now) and i have been having a lot of fun experimenting and learning with it.

Im trying to create a side scrolling arcade shooter in which my character would be allowed to hover through a cylindrical/circular space. ie., the actor would be allowed to move in a circular path defined along the x and y axis as well as move through the z axis.

I tried working with splines but i was not able to move the character in the z axis as my character is locked onto the circular path defined by the spline. I used the below tutorial as a reference.

I have considered rotating the complete arena/level while keeping the actor stationary but it just doesn’t seem right in doing so. Im currently experimenting with navmesh (and its going to take me a while before i figure out if its possible or not). While im still working out the issues and attempting to implement this cylindrical navigation space, it would be great if anyone had any suggestions on how i could approach this.

Thanks in advance… :slight_smile:

Is there any specific reason you need to use a spline?

If you absolutely don’t need the spline I would just create blocking for areas you don’t want your player to go and either adjust camera or character rotation but not camera as the character moves. You can do either of these by having the character and camera as separate parents in the actor and only rotating either the camera or character component rather than the full actor. You could get component facing and use it the same way you could use actor facing.

This would give you more freedom than a spline and may be less work. Also, you wouldn’t have to rely on tick events like suggested in that tutorial. Sometimes tick events are needed but in my opinion if you can do without them it’s better practice.

Well… Been a while and i have been making fairly good progress so far…

Remembered this topic i had created so thought about posting the solution for it.
I know there are a lot of folks out there who were also looking to achieve this and might find this useful.

The solution is to use “RotateVectorAroundAxis” :slight_smile:

1 Like

Greetings World,

Thought its only fitting to end this post with a demo of the game.

Gameplay Demo: Chakravyuh - Alpha Gameplay Demo at Godlike Difficulty - YouTube

On another note, this forum obviously has a lot of skilled pros and enthusiasts around.

It would be wonderful if you could share your thoughts/feedback for me to work on.

1 Like