playMaker

Author Topic: Problems figuring out "get controller hit info"  (Read 1511 times)

nemirc

  • Playmaker Newbie
  • *
  • Posts: 8
Problems figuring out "get controller hit info"
« on: November 10, 2014, 07:52:49 PM »
Hello all. I've been using PlayMaker for a couple of weeks and this is my first post here  8)

I am working on a small exercise where I try to make my character face a wall after it collides with it, and I saw the "get controller hit info" action has a normal so I thought it would help.

Basically my idea is this. I want to make a "wall climbing state," and when the character hits the wall I want to change its orientation so it faces the wall regardless of the direction it came from. I want to get the surface normal so I can use it to make my character face the wall so when it climbs it looks like it's actually looking at the wall, not floating across it (climbing up while looking at the exact opposite direction, for example).

So, I set the "get controller hit info" but I can't seem to get it work. I can trigger the event transition fine, and it shows that my wall is the object my character collided with, but the "normal" is set to 0,0,0, and a fraction of a second after the FINISH transition is set so I'm sent back to the default walking state and the ground plane is shown as the collider (the ground has no rigid body anything, and it's not even using the collision tag defined in the GCHI action), and my normal is set to 0,1,0 (vector pointing upwards).

I don't know if there's something wrong with my setup, or if I should use a completely different setup for this. Maybe using a constant raycast between my character and climbable walls?

Thanks