playMaker

Author Topic: Custom WASD- no collision with walls  (Read 2633 times)

sirerr

  • Playmaker Newbie
  • *
  • Posts: 2
Custom WASD- no collision with walls
« on: March 25, 2013, 09:37:25 PM »
Hi Folks, could use some help.

I am working on a game in which you play a quadcopter that flies around in a sewer. When I started using playmaker, I used the controller move but now I have my own WASD controls which are translate states to move it forward, back, right and left. For some reason, using the original controller move, the copter doesn't go through the walls, it collides with it. Using my custom controls though the copter goes right through the wall.  >:(

I am new to Unity and game development. I have no idea what is going on... thanks for any help.

sirerr

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Custom WASD- no collision with walls
« Reply #1 on: March 26, 2013, 07:10:40 AM »
When you use your custom controls and remove/disable the old controller are you adding a collider component in place of it?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

sirerr

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Custom WASD- no collision with walls
« Reply #2 on: March 28, 2013, 01:58:25 PM »
Hi Lane,

No, I didn't add another character controller, I would think it'll use the one I already had.

sirerr

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Custom WASD- no collision with walls
« Reply #3 on: March 28, 2013, 02:05:19 PM »
So why are you keeping the character controller component?

Your controls are probably using transform, which is letting it go through the wall. Use physics, and it wont.
« Last Edit: March 28, 2013, 02:11:05 PM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Custom WASD- no collision with walls
« Reply #4 on: March 28, 2013, 02:13:55 PM »
what kind of controller did you create? Because unity natively only supports rigidbody collision. If you don't use any action that uses either a rigidbody or a character controller, then you will go through walls, because there are no collision checks.
Best,
Sven