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"

How can I implement a bounce mechanic?

I am making a mini golf game in which the player can bounce off of walls, but for some reason the ball just stops or goes to the side when it hits a wall. I have tried a few things with no real breakthrough. I am using a Launch Character node to push the ball around, and a physics volume to make the ball seem like it is rolling around. Any suggestions?The Desired Result

Product Version: UE 4.19
more ▼

asked Jul 18 '18 at 03:15 AM in Blueprint Scripting

avatar image

Sublimed Games
1 1 1

avatar image Sublimed Games Jul 18 '18 at 04:35 PM

Still haven't found a solution. :/

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Why are you using a Character pawn for the ball, instead of a basic Pawn, or even a non-pawn Actor? Is it so you can smoothly replicate its changes in velocity and rotation over the network? If you don't need that, then it might behave more like you want if you get rid of the CharacterMovement component stuff, and just use plain old physics. Character Movement is meant to do things like slide smoothly along a wall when it bumps up against it (imagine how annoying it would be in a 1st person shooter game if you bounced every time you touched a wall), so that might be part of the problem.

If you need Character Movement for some reason, then you can play with values such as Ground Friction and deceleration etc. to get it to act more like a plain old physics actor.

But I would say that unless you need the ball to be able to be directly controlled by a player or AI so they can make it change direction and perform actions like a Character, then you don't need it to be a Character. You can use Apply Impulse on it as a physics simulated actor instead of using Launch Character.

more ▼

answered Jul 23 '18 at 11:01 PM

avatar image

3.7k 18 19 20

(comments are locked)
10|2000 characters needed characters left

Hello Sublimed,

Try creating a Physical Material and assigning it to your ball. (Restitution will be the value you'll want to tweak)

Hope that helps,

more ▼

answered Jul 18 '18 at 09:54 PM

avatar image

Alex O ♦♦ STAFF
2.5k 3 8 9

avatar image Sublimed Games Jul 22 '18 at 12:44 AM

This seems to only do vertical bouncing.

(comments are locked)
10|2000 characters needed characters left

You may wish to add projectilemovement component. It has control for bouncing, and can be activated/deactivated when needed.

more ▼

answered Jul 18 '18 at 10:15 PM

avatar image

231 1 3 7

avatar image Sublimed Games Jul 22 '18 at 12:44 AM

Doesn't seem to be working. :/

(comments are locked)
10|2000 characters needed characters left
Your answer
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