Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: GrandAlchemist on March 09, 2014, 08:48:47 PM

Title: Player can enter walls if scale is expanded. Help!
Post by: GrandAlchemist on March 09, 2014, 08:48:47 PM
Hey guys!

I want my player to be able to grow/get bigger for power-up.

When I scale the player it can go through walls/colliders after it expands - the capsule enters the wall, and the collider is ignored (meaning the player can freely walk through the wall)

How do I "push" the player outside of the collider when I make the radius bigger?

Alternatively, is there any way to make sure the player cannot go through the wall in the first place?

Thanks!
Title: Re: Change size of character controller radius and wall clipping.
Post by: redikann on March 10, 2014, 08:32:55 AM
I believe I read in the Unity documentation that if you change your collider settings then Unity has to recreate the collider and that wont happen in an update call. You might want to check that.
Title: Re: Change size of character controller radius and wall clipping.
Post by: GrandAlchemist on March 27, 2014, 03:35:32 AM
Could raycasts be used to detect if the player is "in" a wall collider, then set the player position outside the wall collider?

Same thing with the ground... Is it possible to raycast downwards if the player falls through floor/terrain, and set player position above ground?

I am not very familiar with raycasting but would this be a suitable approach?? Thanks!
Title: Re: Player can enter walls if controller radius is expanded. Help!
Post by: GrandAlchemist on March 31, 2014, 04:57:28 AM
Still having troubles with this -

I had some success making the skin width of the character controller larger, but means that the character doesn't have good contact with ground/objects (makes it all floaty)