playMaker

Author Topic: Collision Detection Problem  (Read 2137 times)

EpicChowder 619

  • Playmaker Newbie
  • *
  • Posts: 13
Collision Detection Problem
« on: January 29, 2015, 09: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

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Collision Detection Problem
« Reply #1 on: January 29, 2015, 09: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: 2511
  • Mender of the past
    • Cleverous
Re: Collision Detection Problem
« Reply #2 on: January 29, 2015, 09: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

EpicChowder 619

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Collision Detection Problem
« Reply #3 on: January 29, 2015, 09: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
Re: Collision Detection Problem
« Reply #4 on: January 29, 2015, 10: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.