Swinging When Hit With Actor
TheAJTurner
Member, PRO Posts: 18
Hi I have been looking for a solution to this for a while and I haven't found anything.
So my game is a basketball game where you can throw a basketball into a basket. I want to add a light that hangs down from the ceiling. I want the player to be able to throw the ball at the light and have the light swing back and forth after it is hit. I have not found a good way to do this.
Any help would be great! Thanks!
Comments
You could set up two custom collision shapes to form a hinge like this (the orange parts are all one actor):
Oh wow I hadn't thought of using the custom collision shapes like that! Thats a great idea thank you Socks!!
If I understand you I think I would animate the lamp swaying. Have an alpha 0 (invisible actor) with collide rule in it. If ball collides the actor then animate swaying lamp.
You would need an attribute Boolean to do that.
I just did that last week and it looked very natural.
Do you need it to sway in both directions? Then I used two animations pending players X position.
If your stuck I can send a project to show.