playMaker

Author Topic: Collision Detection Problem  (Read 1225 times)

EpicChowder 619

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Collision Detection Problem
« on: January 29, 2015, 07:16:53 AM »
Hi, relatively new to Playmaker and I'm trying to create a simple 3d game where you move one cube to the goal cube to reach the next level. The floor and walls are cubes with rigid bodies and the player also has a rigid body. The player moves the cube with translate.

The problem is that the player can move through walls. Iv'e tried setting up collisions in the players FSM but to no avail. If anyone can help me it will be greatly appreciated.

Also, if you notice something not relating to collisions but might cause me problems with other things, dont hesitate to point them out.

blackant

  • Sr. Member
  • ****
  • Posts: 436
  • http://blackantmaster.com
    • View Profile
    • blackantmaster.com
Re: Collision Detection Problem
« Reply #1 on: January 29, 2015, 07:19:50 AM »
you'll have to check late update inside your translate action
so the physic is updated during the right time

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2487
  • Yup.
    • View Profile
    • Cleverous
Re: Collision Detection Problem
« Reply #2 on: January 29, 2015, 07:36:33 AM »
Using Translate or directly affecting the Transform of a GameObject will ignore colliders to do what you tell it so you need to use a Character Controller (or something) or go with Physics based inputs using Forces.

Static colliders / environment items do not need Rigidbodies, simply adding a collider to the walls will stop a character rigidbody from passing through it if you use a controller that takes collisions into account.

EpicChowder 619

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: Collision Detection Problem
« Reply #3 on: January 29, 2015, 07:38:46 AM »
you'll have to check late update inside your translate action
so the physic is updated during the right time

I've tried checking both the late update and the fixed update but i can still move freely through walls.

EpicChowder 619

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: Collision Detection Problem
« Reply #4 on: January 29, 2015, 08:02:21 AM »
Using Translate or directly affecting the Transform of a GameObject will ignore colliders to do what you tell it so you need to use a Character Controller (or something) or go with Physics based inputs using Forces.

Static colliders / environment items do not need Rigidbodies, simply adding a collider to the walls will stop a character rigidbody from passing through it if you use a controller that takes collisions into account.

Thank You, problem fixed.