Hello
I got game which i’m woking on. there is ball. the ball bounce at the walls also another onject. i want it bounce at walls but stick to the objects. how can i do that.
thanks
Hello
I got game which i’m woking on. there is ball. the ball bounce at the walls also another onject. i want it bounce at walls but stick to the objects. how can i do that.
thanks
First, make sure that the Simulation Generates Hit Events
setting is enabled for the both actors (the ball and your other objects in this case). Once that’s set up, right click on the Event Graph of your ball BP, type in “Event Hit” on the menu that pops up and place the node by hitting enter. Then get an Attach Actor to Actor
node, connect the Other
pin of Event Hit
into the Parent Actor
pin of the node, connect Self
(which you can drag out of the Target pin) into the Target
pin, and finally change the Keep Relative
selections on the node to Keep World
.
Hope this helps!
Hey there @trem2trem! Welcome to the community! VA went over basically most of the relevant portions, but to add one thing I’d recommend either setting up collisions so that the balls will stick to only specifically tagged objects kind of like this post (but in your case a bit reversed). Alternatively you can filter by collision as well.