Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Adam Z on October 26, 2015, 03:08:42 PM
-
I have a State called crouch in which it changes the collider height with a Set Property. The problem Im having is that when I'm crouching under and object and then I un-crouch (the collider height changes to the normal size), the object and player colliders overlap. What would be a good way to only let the collider change size (or change state to standing) if two colliders don't intersect?
Thanks.
-
Hi,
maybe you could try setting 2 colliders and when crouching set the top collider as trigger and let it check if it is overlapping when uncrouching.
then use a on trigger exit on it so when not any more under the object it can let the player stand and uncheck trigger again.
if you don't understand what i mean i will make a sample video of what i mean :)
just let me know
-
Is it possible to do it with a raycast on the y-axis?
-
Hi,
yes that is possible
but you might want to use Raycast2 (Custom Action)
you can get it on the EcoSystem (https://hutonggames.fogbugz.com/default.asp?W1181)