HI, I’ll explain my game play intention so you have a better idea of what the behavior is I’m after. I’ve attached an image of the game in play for vis ref and some BP functionality screenshots.
What I want
I’m working towards a 2D, 2 player shared screen arcade style game. I’m making it in 3D for the visual style I’m after. The core of the game play requires a ball that behaves like a slow motion basketball, once a player strikes the ball with their character I want the ball to change direction and have velocity added to it as you would expect. After the ball has been struck I want it to continue moving at a steady low velocity, picturesquely gliding through the air in arcs, able to bounce off the arena’s surfaces while very slowly loosing momentum before coming to a rest on the Arena’s floor. The aim being that the Ball is almost constantly on the move around the game arena and requires very little player interaction to keep going.
What I have
At the moment my ball (TheBallBP, basically a Hockey Puck perpendicular to the player view) has a Sphere Collision Component (do you recommend this for accurate Ball physics behavior or is there a better method?) and a Projectile Movement Component which has given The Ball similar characteristics to the UE4 FPS template’s bouncy gun projectiles, which seems to be a positive step toward my aim. The problem I have now is how I should think about implementing the interaction between the Player Character (Green Block in Game Ref Image) and The Ball (Red circle…). I thought the Projectile Movement Component’s Bounce would take care of the player being able to jump and hit the ball, but in testing it is unreliable, sometimes the Ball bounces off the Character, sometimes the Character pushes the Ball high but no momentum(not sure on correct physics terminology) is added to the Ball; as soon as the character stops pushing the Ball up and looses contact the Ball immediately starts to fall rather than carrying on upwards.
My Solution Ideas
I tried setting up an Add Impulse to the Ball when the Character hits it but that doesn’t seem to work, I assume because the Ball doesn’t have Physics enabled. So I’ve tried setting up some rough functionality that affects the Velocity Vector in the Projectile Component. I tested it and have noticed the Ball now repels off the Character, but I’m not really sure what the Velocity Vector parameters represent, could you explain this? If you can suggest a better method for having the player be able strike the ball and affect it’s momentum please share.
The Projectile Movement doesn’t provide many Physics such as weight, although this could be my blurred understanding of what differs a Physics object and a Kinematic object, since my understanding is naive, Kinematic makes sense to me but Physics seems to be a totally separate dimension, as such I can’t seem to have the Projectile Movement Component running long after spawning while the Ball’s Collision’s Physics Simulation is activated, is there a workaround for this?
Any advice you can give me to approach implementing this ball behavior or other elements I should consider?
Thanks a lot for taking the time to read