playMaker

Author Topic: Player Collision  (Read 3035 times)

mathius777

  • Playmaker Newbie
  • *
  • Posts: 38
Player Collision
« on: August 26, 2013, 11:54:05 PM »
So I have a controller script that works perfectly fine. It allows the player to collide with tiles on a 2d map. I was trying to make a PM version of this script and am having issues. My character collides with items for a second, but then if I continue moving, he will move through the object. In my script I am doing a raycast to prevent the character from moving if he is going to move inside of an object. Do I need to do the same thing with PM. or is there a better way? And also, is something like this best left to just using a script? I feel like I am having to fight with PM a lot to get certain things to work the play maker way.  How can I determine what would be best to do in scripts, and what would be best to do in PM? Thanks for any help.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Player Collision
« Reply #1 on: August 27, 2013, 07:55:56 PM »
I am trying to envision your setup as I don't work in 2D much. But my first guess would be if your using a character controller , check your skin width, that number will decide how much two colliders can enter each other. I do believe that if your using just planes for collision in 2D your character controller can accidentally pass thru.

mathius777

  • Playmaker Newbie
  • *
  • Posts: 38
Re: Player Collision
« Reply #2 on: August 27, 2013, 10:50:16 PM »
I see. It works with the character controller now, but I am using Smooth Moves for animation, and I think it'd be best to use the colliders on the bones of the animation for collision, but I am having issues with doing this, as I dont know how to use PM to stop a translation if a collision is detected on a bone collider.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Player Collision
« Reply #3 on: August 27, 2013, 11:56:36 PM »
If your using the character controller check out the character collision flags and info actions. You can store your data in variables and then design logic around it. Also check out the system events which can react to collision and triggers without extra logic.