playMaker

Author Topic: Getting a tag from a walkable surface.  (Read 3487 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Getting a tag from a walkable surface.
« on: September 23, 2013, 07:42:11 PM »
Making footsteps. Need to get the tag from the surface the player is walking on.

Ive tried Get Collision Info, followed by Get tag, to no avail!

Doesnt the Character Controller "collide" with the floor?

Mark

« Last Edit: September 24, 2013, 03:54:20 PM by markfrancombe »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Getting a tag from a walkable surface.
« Reply #1 on: September 24, 2013, 06:01:58 AM »
Hi,

Is your state actually coming from a system event "ON COLLISION ENTER"?

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Getting a tag from a walkable surface.
« Reply #2 on: September 24, 2013, 06:29:36 AM »
Er.. no.. I guess thats it?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Getting a tag from a walkable surface.
« Reply #3 on: September 24, 2013, 06:41:27 AM »
Hi,

 yes, the get collision info action only works on a flow of states initiated by a system event about collisions ( which internal feeds data that you retrieve in "get collision info")

yes?

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Getting a tag from a walkable surface.
« Reply #4 on: September 24, 2013, 06:47:14 AM »
Ill set this to SOLVED then.. will test tonight.

I should have clicked the "blue book" all explained there..

Thanks Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Getting a tag from a walkable surface.(SOLVED)
« Reply #5 on: September 24, 2013, 06:51:57 AM »
Hi,

 no problem!

Bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Getting a tag from a walkable surface.(SOLVED)
« Reply #6 on: September 24, 2013, 03:43:52 PM »
I was too fast to set to SOLVED
 :P
So I tried this:

That didnt work, so I did this:


The first works a little better cos at least the green line from controller colidor hit lit up, and De-lights when I jump.

BUT NEITHER gave me any hint that it knew any tags belonging to the geometry Im standing on.

All I want is to tag all walkable surfaces. (metal, dirt, concrete) etc. and use Playmaker to transition to a place where I trigger a script on the character.

At the moment the script only does ONE sound, but works well. As a botch job I will attatche multiple scripts, with different sound on each, and just use PlayMaker to disable and enable as we step from one surface to another.

I may be able to alter the script, so that within the code itself we trigger different sounds based on what variable is fed it... might be better.

BUT FIRST:

TAG GRABBING??? Why doesnt it work?
« Last Edit: September 24, 2013, 03:54:08 PM by markfrancombe »

parallel

  • Full Member
  • ***
  • Posts: 155
Re: Getting a tag from a walkable surface.
« Reply #7 on: September 24, 2013, 04:40:35 PM »
Maybe you need 'Game Object Tag Switch' ?

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Getting a tag from a walkable surface.
« Reply #8 on: September 24, 2013, 06:22:44 PM »
Thats GREAT Parallel, the perfect action for what Im doing, only trouble is that the collision is not giving me a tag!

This is what I have... its placed on the player, and the ground here, is tagged concrete (hes stood on a road)

So.. whats up? Why isnt it working?

parallel

  • Full Member
  • ***
  • Posts: 155
Re: Getting a tag from a walkable surface.
« Reply #9 on: September 24, 2013, 06:55:03 PM »
Would it be too costly to raycast (a short distance or by layer) from the foot and then get tag from the stored surface?

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Getting a tag from a walkable surface.
« Reply #10 on: September 25, 2013, 12:37:36 AM »
I don't know about being costly, it not a mobile game, however I'm trying to reduce draw calls and optimize, as I'm getting low frame rate already.

Anyway, the player is already sending one ray for mouse pick.
I'd like to avoid another.

More importantly. I d like to know why this doesn't work, I have confirmed that the collision works cos I can see green lines disappearing on the input connection when I jump. It must be something else.