playMaker

Author Topic: Making interactive objects collide with other objects properly.  (Read 3910 times)

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Making interactive objects collide with other objects properly.
« on: January 16, 2015, 11:34:56 PM »
In the picture below when I have another object collide with walls or whatever, it doesn't work. Is there a way to solve this without having to make multiple layers? Or can it be solved with a FSM?


coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #1 on: January 18, 2015, 08:36:15 PM »
Anyone? This is a issues I am still having regarding collision.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Making interactive objects collide with other objects properly.
« Reply #2 on: January 19, 2015, 02:31:41 AM »
Hi,

 Can you clarify, I don't get it :) what doesn't work and how are your gameobject arranged?

 Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #3 on: January 19, 2015, 03:43:05 AM »
Hi,

Can you clarify, I don't get it :) what doesn't work and how are your gameobject arranged?


I have a object with a box collider. The problem is when I have it come into contact with other objects that do have colliders, it acts like trigger is enabled. It's like the object acts like it doesn't even have a box collider. Get the same results with a mesh collider.

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Making interactive objects collide with other objects properly.
« Reply #4 on: January 19, 2015, 05:56:46 AM »
Do you have a rigidbody attached?

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #5 on: January 19, 2015, 06:37:06 AM »
Do you have a rigidbody attached?

Yeah. With Kinematic on and Constraints except for Y position.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Making interactive objects collide with other objects properly.
« Reply #6 on: January 19, 2015, 07:24:21 AM »
If you want it to react to physics then you must move it with physics. Directly changing the Transform will lead to problems.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #7 on: January 19, 2015, 03:30:21 PM »
If I can't modify the Transform, how am I suppose to make the object be positioned or scaled properly?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Making interactive objects collide with other objects properly.
« Reply #8 on: January 19, 2015, 03:33:08 PM »
By using Physics inputs like AddForce and AddTorque, Physics Joints, other collisions, custom controllers, etc..

The built-in Character Controller component does something similar without a Rigidbody.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #9 on: January 19, 2015, 03:42:26 PM »
By using Physics inputs like AddForce and AddTorque, Physics Joints, other collisions, custom controllers, etc..

The built-in Character Controller component does something similar without a Rigidbody.

So you would say that it would be better (like in the example picture) to add a character controller even though that object going through other colliders has a FSM? Cause when I try to set up that object to be carried around a level without one (since it is needed for the player to pick it up cause it has a mouse pick event plus a move towards action) I'm unable to pick it up.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Making interactive objects collide with other objects properly.
« Reply #10 on: January 19, 2015, 03:45:41 PM »
Sorry, I can't really figure out what you are asking there...
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #11 on: January 19, 2015, 04:27:48 PM »
Sorry, I can't really figure out what you are asking there...

In that screenshot, the bolder (the object going through the flower pot)has a FSM with a Move Towards action because I can't get that action to work on a another trigger(which is parented to the player) to move and carry objects around the whole scene.

So my point is do you have a solution to this problem, having interactive objects colliding with other static or regular objects that DON'T have FSMs?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Making interactive objects collide with other objects properly.
« Reply #12 on: January 19, 2015, 04:40:41 PM »
There is no single answer to your question. The solution depends entirely on your game. You should read up about the collision system in Unity and decide how you intend to approach the problem as a whole, as basically everything in your game will revolve around how you decide to approach this issue.

http://docs.unity3d.com/Manual/CharacterControllers.html
http://docs.unity3d.com/Manual/RigidbodiesOverview.html
http://docs.unity3d.com/Manual/CollidersOverview.html
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Making interactive objects collide with other objects properly.
« Reply #13 on: January 20, 2015, 03:10:58 PM »
Regardless if a objects scale is less than 1 and for smaller walls(cubes) are around four and half?