Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: MaximilianPs on December 11, 2014, 01:32:00 PM
-
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 >:(
(http://i62.tinypic.com/x6ddl0.jpg)
There are some good souls here which could help me to solve it ?
-
Hi!
Put Get Collision info in new state, it needs to be right after Collision Enter happens.
-
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.
-
thank you all, I've solved the problem by using Get Controller Hit Info instead of Get Collision info ;D
(http://i60.tinypic.com/1e2ull.jpg)
(http://i62.tinypic.com/10ykq4k.jpg)
-
Ok, now a new problem coming out... when I've added a terrain on scene, sooner as I press Play
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 ?
-
Are you trying to change the terrain material/texture?
-
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.
-
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?
-
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 ? ::)