Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: SpacialPumpkin on August 14, 2013, 12:29:27 AM
-
Hi! I am wondering how to get my character that has the character control component to be able to push a ball and make it roll. I gave rigidbody to the ball and it still stays static. Am I supposed to make an apply force action? Or can I just make it react by itself through collision?
-
Hi,
if you are using a Character controller, indeed physics doesn't work the same way. and indeed you simply need to look for collisions and apply a force in the direction of the collision.
But maybe in your case you could switch to a full physics character? do you expect a lot of similar interactions in your game?
bye,
Jean
-
Hi,
if you are using a Character controller, indeed physics doesn't work the same way. and indeed you simply need to look for collisions and apply a force in the direction of the collision.
But maybe in your case you could switch to a full physics character? do you expect a lot of similar interactions in your game?
bye,
Jean
I want to make a 3d Soccer game with the collisions of a player being able to move the ball with just moving into it, and being able to kick it. How can I achieve this with an FSM?
-
Hi,
here is a starting point. move the character and it will kick the ball automatically.
few points to understand the system:
-- I added a capsule collider, because character controller is a special kind of physics object, so it's needed ( as far as I can tell)
-- the ball is checking for collision event, ONLY coming from the player ( I labelled the player with a "player" tag)
-- I get the velocity of the collision which give me the direction of the kick ( inverted ) so I multiply it with a negative factor to kick it away.
-- I also add an upward force to make the ball go in the air.
Have a go, if you have questions, don't hesitate.
bye,
Jean
-
Hi,
here is a starting point. move the character and it will kick the ball automatically.
few points to understand the system:
-- I added a capsule collider, because character controller is a special kind of physics object, so it's needed ( as far as I can tell)
-- the ball is checking for collision event, ONLY coming from the player ( I labelled the player with a "player" tag)
-- I get the velocity of the collision which give me the direction of the kick ( inverted ) so I multiply it with a negative factor to kick it away.
-- I also add an upward force to make the ball go in the air.
Have a go, if you have questions, don't hesitate.
bye,
Jean
Wow! Thank you so much!! I have a question though...when I try to add a capsule collider on to my object, it wants to replace my character controller with it. How did you get your object to have both?
EDIT: Woops! Sorry, didn't see the other "Add" option!
-
Hi again. I got everything working, but the only problem is my soccer ball has a lag when it first is touched by my player before it moves. After the first contact with the player and about 2 seconds, it moves around fine. I have tried everything to fix this and I cannot figure it out. Does anyone have any idea why this is happening?
-
Hi,
Does the lag happen in my package as well?
bye,
Jean
-
Hi,
Does the lag happen in my package as well?
bye,
Jean
No, yours is perfect. I just cannot figure out what I did with mine. I followed yours and mine just ended up like this somehow :(
EDIT: Someone pointed out to me that I needed a rigidbody on my player, not just my ball, with a mass of 8. This completely fixed the problem! :)