playMaker

Author Topic: Change game object physics direction/angle[SOLVED]  (Read 2284 times)

Ran_TH

  • Playmaker Newbie
  • *
  • Posts: 5
Change game object physics direction/angle[SOLVED]
« 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 :)
« Last Edit: October 04, 2013, 01:48:08 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Change game object physics direction/angle
« Reply #1 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

Ran_TH

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Change game object physics direction/angle
« Reply #2 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!