Announcement

Collapse
No announcement yet.

Need help with spline based movement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help with spline based movement

    I am trying to make a game like resogun where the player is locked to a circular path shooting enemies. I looked around and apparently the only way to lock player movement to a circle is to use splines.
    I tried to follow this tutorial but am stuck on the first bit: https://forums.unrealengine.com/show...um-style-game)

    He creates a variable with the type, Spline_C and then puts that into the target of his other variable, spline_c does not seem to exist in my unreal, I have tried all other variable types with spline in the name and they don't work. I just cant seem to get that spline1 target bit, http://gyazo.com/4cdca033b6bb9bf5aca6659ecf99ebc9

    If it is a simple solution don't judge me I have only been using unreal for a month

    #2
    Hi Leofixx,

    Here is a skeleton example project based on that tutorial that should help you get started. While not exactly like the game you want to make, it shows a working implementation of following a spline path.

    https://www.dropbox.com/s/1zdnsy8luu...light.zip?dl=0

    Note, you'll have to manually load the Corridor_Test.map as there's no game mode. Use WASD to move the player. The camera automatically follows the spline.Everything else should make sense, if not chuck me a reply.
    Last edited by Yog-Shoggoth; 06-19-2015, 12:15 PM.

    Comment


      #3
      Thank you very much, I looked at what you did and it helped alot. I've now got it working
      I do have another problem now, http://gyazo.com/57944f05a204f4516bab395d7c638fc1 if you look at this gif you will see that my cube character is following the path as I would like. For the game i'm trying to make however I need the camera to constantly be at the side of the character, facing into the circle (Where all the cuboids are). do you think you could help me with that?

      Comment


        #4
        Hi Leofixx,

        You need to modify your character blueprint to set the rotation of the player and the camera to match the spline tangent, see the screenshot below. You'll also need to set the spring arm on the character to -90ยบ on the Z axis and enable the Inherit Yaw option under the Camera Settings section.
        Click image for larger version

Name:	Spline_Camera_Correction.png
Views:	1
Size:	150.3 KB
ID:	1080142

        Comment

        Working...
        X