Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: EpicChowder 619 on January 29, 2015, 09:16:53 AM

Title: Collision Detection Problem
Post by: EpicChowder 619 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.
Title: Re: Collision Detection Problem
Post by: blackant 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
Title: Re: Collision Detection Problem
Post by: Lane 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.
Title: Re: Collision Detection Problem
Post by: EpicChowder 619 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.
Title: Re: Collision Detection Problem
Post by: EpicChowder 619 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.