Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Ran_TH on October 03, 2013, 06:53:09 AM

Title: Change game object physics direction/angle[SOLVED]
Post by: Ran_TH on October 03, 2013, 06:53:09 AM
So I'm trying to make a simple Pong game with Playmaker. I have everything set up and the ball can bounce against the paddle.

However so far the ball only moves and bounce in Y axis so I think I should set ball direction to random angle when game starts. Problem is, I can't find the method on how to do this yet PM.

Can anyone give any clue or hints? Thanks :)
Title: Re: Change game object physics direction/angle
Post by: jeanfabre on October 03, 2013, 08:05:32 AM
Hi,

 Actually, it's when the ball hit the paddle that the angle should be computed, depending on where the ball hit the paddled.

 Have you checked the playmaker M2h game projects? one is exactly that.

https://hutonggames.fogbugz.com/default.asp?W936

and specifically this fsm:

https://hutonggames.fogbugz.com/default.asp?W938

Bye,

 Jean
Title: Re: Change game object physics direction/angle
Post by: Ran_TH on October 03, 2013, 09:17:41 AM
Oh yes I forgot I have that Breakout sample lol... that set velocity part is certainly what's missing on my project. Without it my ball only bounce to one direction unless I tilt the paddle, which is not how it should work. I'll look into it, thanks!