PlayMaker Help & Tips > PlayMaker Help
How to setup player to possess ball, throw ball and have ball knocked away
mr0boe0jangles:
Hi I'm getting up to speed with PlayMaker and wanted some suggestions on how to most simply set up a player being able to move to collect a ball, when collected the ball moves with the player, until another player knocks them, in which case the ball has gravity applied again and the other player (or any that happens to get near enough to the ball next) can pick it up.
Similar to 'Bari Bari Ball'
Would love suggestions on this! Cheers
Rabagast:
Hi!
You can parent the ball to the player if you want the ball to move with the player.
If another player knock you down, then you unparent the ball. :)
mr0boe0jangles:
Thanks for your reply Rabagast.
I followed your advice and set up the parenting, but I'm having a few issues outlined in this screencast:
//www.youtube.com/watch?v=BBcdtpqY0Ds
-Jumping (with add force on player) doesnt seem to move the parented ball with it.
-Throwing the ball in the opossite direction of the player collides it with the player (should i make the player rotate more quickly or instantly?)
-My throwing settup seems overly complex with axis events, I just need to translate the direction of the input to the direction of the throw
Any help would be GREATLY appreciated.
Cheers!
djaydino:
Hi.
I can't test right now but maybe when parenting you can turn on is kinematic.
as the ball still has its own gravity therefore it does not move together with the player.
This might also get rid of the jiggering from the ball, else i would place another collider.
Make it a little bit bigger than the player and set it as trigger.
Then use a trigger event for the ball.
Then for throwing the ball, first un-parent and disable 'is kinematic' then throw.
mr0boe0jangles:
Thanks djaydino
I now turn on is kinematic when the ball trigger parents it to the player, and off again on throw. The ball now moves better with my player when he jumps up, but if he jumps while running side to side, he doesn't jump as high as though he's running into the ball.
I also made sure I unparent before the add force for the throw.
How do I get the ball to change its location upon pickup so it centers itself in front of my player, rather than the spot at which the trigger collides?
Also how do I add diagonal directions to throw? 'Axis event' only gives me mutually exclusive options. Ideally i'd like the ball to be thrown in exactly the direction of the controller stick, is there a simply way to set force direction according to axis direction?
Thanks!
Navigation
[0] Message Index
[#] Next page
Go to full version