Posted By
|
Message
|
ZeLL_
Registered 13/07/2003
Points 4
|
13th July, 2003 at 11:38:03 -
Im makig a voleyball kind of game (a little more violent)
But i can`t get the ball to act right.. It has to bounce
when it hits the players, but it just slips past them and
hits the gound..
Anyone able to help me?
Projects:
-Death volley- 10%
-Murder at n.ø.v.g.s- 80%
|
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
|
13th July, 2003 at 12:28:28 -
you have to set the direction of the ball instead of just using the bounce command. something like set ball.Direction =(player1.Direction + Ball.Direction) / 2
Craps, I'm an old man!
|
ZeLL_
Registered 13/07/2003
Points 4
|
13th July, 2003 at 12:49:55 -
Hmm ,im getting closer.. Thanx
Projects:
-Death volley- 10%
-Murder at n.ø.v.g.s- 80%
|
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
|
13th July, 2003 at 12:55:00 -
Actually, that formula doesn't work in some cases, I'd say just have the direction of the ball switch 180 degrees (subtract or add 16 to the directional value) and throw a random number between 0 - 4 and subtract or add that to the ball value too, tha way the ball doesn't bounce the same all the time.
Craps, I'm an old man!
|
ZeLL_
Registered 13/07/2003
Points 4
|
13th July, 2003 at 14:47:12 -
I get it.. Cuz the ball should bounce in the direction the character moves.
f.eks: when the player jumps straigt up, the ball should bounce up too..
Projects:
-Death volley- 10%
-Murder at n.ø.v.g.s- 80%
|
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
|
13th July, 2003 at 14:55:52 -
not straight up, rather the upward motion of the character should modify the direction of the ball, example the ball is heading straight for the player ( --> ) then the player jumps and makes contact while heading up ( ^ ) the ball would bounce off the player in this direction ( \ ) towards the top left. Did I explain this good enough for you to understand?
Craps, I'm an old man!
|
ZeLL_
Registered 13/07/2003
Points 4
|
13th July, 2003 at 15:00:13 -
I see.. That makes the ball movement a lot more realistic, thanx a lot
Projects:
-Death volley- 10%
-Murder at n.ø.v.g.s- 80%
|
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
|
13th July, 2003 at 15:44:45 -
not a problem, DC mail me if you have any questions in the future and I'll help as much as I can
Craps, I'm an old man!
|
|
|