Home Unreal Engine

animating a rotating ball

alexworx
polycounter lvl 5
Offline / Send Message
Pinned
alexworx polycounter lvl 5
Hi All,

I am working on my first project in UE. I want to animate a ball moving in my scene up a ramp. I have successfully done that  ( sort of ) with the ball animated along a spline. My issue is the ball does not rotate when it moves.

My question is how do a get it to rotate while its moving along the spline? Or is there a better way to have it move through the scene  and use it along the spline?

Thanks for the help.

Alex

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Its better to have a skeletal animation, unless you have a good reason to have it animated inside Unreal.
  • alexworx
    Options
    Offline / Send Message
    alexworx polycounter lvl 5
    When you say "skeletal animation" do you mean animate it in a another program and import it into UE?

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
  • rymbrant
    Options
    Offline / Send Message
    rymbrant polycounter lvl 4
    Shouldn't be hard with your spline setup.  Make it an actor that attaches to the spline.  Each tick trace to the ground and stick him there (offset by his radius).  Using his velocity,  cause him to rotate based on the distance he moved versus his circumference. 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
  • alexworx
    Options
    Offline / Send Message
    alexworx polycounter lvl 5
    Thanks for the responses. I have to be honest I am not following your process rymbrant. I got the animation in successfully doing it with Obsura advice, although the ball is not rotating. I wired the rotation in max but it come through, I just have to look at that. 
  • alexworx
    Options
    Offline / Send Message
    alexworx polycounter lvl 5
    One more question for you. I have the ball inside and its animated correctly. How do I get the shadows to show up while its animating? What type of light and what do I need to set the light too.

    Thanks!
  • Zablorg
    Options
    Offline / Send Message
    Zablorg polycounter lvl 6
    alexworx said:
    One more question for you. I have the ball inside and its animated correctly. How do I get the shadows to show up while its animating? What type of light and what do I need to set the light too.

    Thanks!
    I believe you would require dynamic lights in order for the lighting to be recalculated in real time.

    I don't know this off the top of my head, but I think you may also be able to optimize the shadow performance by giving the ball some kind of spherical shadow-casting volume, instead of using the mesh to cast shadow.

    (Can anyone confirm/deny that last bit? Am I off-base here? Derived geometry is the basis of capsule shadowing, right?)
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Yeah skeletal meshes can use capsule shadow, but it isnt absolutely necessary to use that method.. You guys can always just check out the official documentation if you arent sure about something. But basically you would make a physics asset for the mesh, and enable capsule shadows on the mesh.
  • alexworx
    Options
    Offline / Send Message
    alexworx polycounter lvl 5
    Thanks guys for the help, appreciate it. I did some digging and found that I was actually getting shadows with my current light setup but they were just very weak.

    I didn't know about the physics assets so I found that and turned that on, will do a quick bake and see if that helps too.

    Yes I have been going through the doc and the videos on line, some really great and helpful info.

    AM

Sign In or Register to comment.