Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | BenVella |
I’m constructing a “ping-pong” paddle.
I would like to create an area behind the paddle that interacts with the RigidBody2D ball on the field, and if caught inside, it will redirect it back out in front of the player.
I set an Area2D with gravity point enabled, gravity vector of (1,0) (to shoot to the right) a gravity value of 1024 and 5 damping.
The damping itself does work bringing it down to minimum speed allowed on the ball (set inside the ball’s integrated forces) but no directional change occurs.
- Project settings has removed default 2d damping but allowed gravity with a 0,0 gravity vector to not cause the ball to fall to the bottom of the screen.
- The rigidbody2d ball itself clamps to a max and min speed which works fine within integrated forces method.
- No gravity appears to be getting applied
- I attempted to enable contacts monitoring on the ball to no effect, damping still works so the area2d is still applying an expected effect.
Any suggestions on how to do this? I also realize I’ll have to contend with the ball passing through the player’s kinematic collision when having to go through there but I haven’t thought that far yet
Thanks,
Ben