playMaker

Author Topic: No collision when moving a character  (Read 2055 times)

questo22

  • Playmaker Newbie
  • *
  • Posts: 1
No collision when moving a character
« on: January 17, 2013, 10:00:28 AM »
Hi,

I did things from the tutorial about moving your character by clicking mouse button. When i move my character he walks through the wall (box) and there is no collision.

Screen:
http://img72.imageshack.us/img72/6199/colrh.jpg

Settings

http://s1.postimage.org/qu6jb7mst/screen1.jpg
http://s13.postimage.org/ha4x4fnw5/screen2.jpg

I have character controller, box colliders. I have removed the rigidbody.

What is wrong with it? How to fix it? I want to move my character and block him when there is a collision.
« Last Edit: January 17, 2013, 12:52:26 PM by questo22 »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: No collision when moving a character
« Reply #1 on: January 17, 2013, 01:23:53 PM »
Move Towards doesn't respect collisions since it's just setting the GameObject's position.

If you're using a Character Controller you should use Controller Actions to move the GameObject. E.g. Controller Move or Controller Simple Move. These will respect collisions...

With those actions you'll need to get the movement vector towards the click, and use that to move. It would be nice to have a Controller Move Towards action that did that part for you...