Ok, so my setup is this, i have floor plane, 4 wall planes, player kinematic object and ball.
I want ball to increase speed when it hits anything (for now i use restitution = 1.01), in actuall game ball will get deleted once it hits goal ghost (which does not exist in current setup).
Next is that ball must not loose speed, i manage this by setting friction to 0.
Problem with setting friction to 0 is that ball will not move by rotation, but by sliding, and i want rotation.
If i set friction to positive value this happens:
i hit ball, it starts moving like bowling ball (no sliding), then it hits wall, after hit on wall, it starts moving back, but its still rotating towards wall and loosing speed.
How to configure ball in pong game?
-
- Posts: 24
- Joined: Thu Sep 08, 2011 1:59 am
Re: How to configure ball in pong game?
Hi,
have you made any progress in your pong game?
I have a similar project and want some guidance. here is the link http://www.bulletphysics.org/Bullet/php ... =17&t=7416
have you made any progress in your pong game?
I have a similar project and want some guidance. here is the link http://www.bulletphysics.org/Bullet/php ... =17&t=7416
-
- Posts: 168
- Joined: Tue Jan 04, 2011 11:47 pm
Re: How to configure ball in pong game?
Is it ok to apply horizontal force on the center of the ball to make it accelerate during its rolling?
Or apply a torque to make it roll and at the same time, set the friction to 0 ?
Or apply a torque to make it roll and at the same time, set the friction to 0 ?
-
- Posts: 24
- Joined: Thu Sep 08, 2011 1:59 am
Re: How to configure ball in pong game?
Hi can you send some source code for this. I have something similar but want to know if there really is a better implementation.