playMaker

Author Topic: Apply Physic to custom Character Controller w/o Physic implemented :\  (Read 3410 times)

MaximilianPs

  • Playmaker Newbie
  • *
  • Posts: 5
Hello there, first post, from a noob here  ;D

The scenario is this one:
 We have a Character Controller which is custom, and the developers didn't have implemented the physics, so we are looking for some method to move/push objects that use Colliders.

I've already made some test, with "Collision Enter" or "Controller Collider HIT" and then via Get Collision Info tried to read which object was hit, but Game Object Hit still equal to none  >:(



There are some good souls here which could help me to solve it ?
« Last Edit: December 13, 2014, 05:10:43 AM by MaximilianPs »

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 715
    • Flashing Lights
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #1 on: December 11, 2014, 01:39:34 PM »
Hi!

Put Get Collision info in new state, it needs to be right after Collision Enter happens.

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #2 on: December 11, 2014, 09:23:07 PM »
Or you can create a physics object about the size of the character, and parent it to the character, and set the rigidbody component to is Kinematic, also disable any mesh renderer so it will be invisible. That way, you'll character will be able to push physics object around it.

MaximilianPs

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #3 on: December 12, 2014, 04:41:08 AM »
thank you all, I've solved the problem by using Get Controller Hit Info instead of Get Collision info  ;D




« Last Edit: December 12, 2014, 04:43:48 AM by MaximilianPs »

MaximilianPs

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #4 on: December 13, 2014, 05:15:17 AM »
Ok, now a new problem coming out... when I've added a terrain on scene, sooner as I press Play

Code: [Select]
Setting the Material property is not supported for Colliders of type TerrainCollider.
I find a post here when someone solved this problem by

no, i'm simply made a get collide infos to get the position of the impact
never asked for material ...

i solved my problem by getting the position of the transform instead of impact point.

can some one help me with this things, please ?
« Last Edit: December 13, 2014, 05:23:45 AM by MaximilianPs »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #5 on: December 13, 2014, 09:46:23 AM »
Are you trying to change the terrain material/texture?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MaximilianPs

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #6 on: December 15, 2014, 05:56:20 AM »
nope the scene is pretty empty with default material and some with textures, the error come out just as I lick play and scene become ready to be played.

« Last Edit: December 15, 2014, 05:59:11 AM by MaximilianPs »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #7 on: December 15, 2014, 07:14:48 AM »
You're going to have a loop problem with the PhysicExcluded tag compare firing finish since it will fire on every collision and compare it. If terrain is excluded (since you can affect terrain in that way) then you should use collision actions and the filter mask.

That might be contributing to the error, but it seems to be complaining about trying to affect the materials on a terrain. Does the player have any other FSMs and hes the only other thing in the scene? Does it appear when you delete him?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MaximilianPs

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Apply Physic to custom Character Controller w/o Physic implemented :\
« Reply #8 on: December 15, 2014, 12:01:06 PM »
Yes, it have some FSM on it, and PlayMaker is the last component loaded, maybe should i load it first ?

I'm completely new to PlayMaker so, can you explane how can I do to avoid useless loop ?
I mean, how could I say to ignore the PhysicExcluded tag in a correct way ?  ::)