Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

sphere rolling towards the player

So I'm pretty new to UE, and game dev in general. I've started a project using the first person shooter template. So i've created this "enemy" which is a sphere. At this moment it faces the player and moves towards it. I would like it to rotate, so it looks like it's rolling and not just moving. This is what i have at this point.

alt text

I've tried several stuff to make it roll, but with no results. any idea on how to achieve this? thx!

Product Version: UE 4.20
captura.png (179.1 kB)
more ▼

asked Jul 22 '18 at 11:08 PM in Blueprint Scripting

avatar image

1 2

avatar image IndieGameCove Jul 23 '18 at 03:02 AM

there are a few ways to do it. I would probably use the physics system that would probably look the best and it's pretty easy to set up. you could use the 'add force/impulse at location' nodes to make it roll. if you put the enemy's origin in the center of the sphere then the sphere location minus some of the Z value will add a force in an offset location giving it some roll. the torque node would probably work to, depending if the want the rotation to drive the movement or the movement to drive the rotation.

another option is to use an animation. so basically you would get a looping rotation animation from blender or whatever program you use and then use that the same as you would a walk/run animation.

the third option is to rotate it in the blueprints. for that you would need to make sure your sphere mesh isn't the root of the blueprint since you would turn the root to face the player, while rolling just the mesh component. https://www.youtube.com/watch?v=1uPSAiD1LbI

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question