playMaker

Author Topic: [SOLVED] Vector 3 Problem  (Read 2719 times)

MkAndersson

  • Guest
[SOLVED] Vector 3 Problem
« on: June 13, 2012, 04:30:48 AM »
Hello. I'm trying to get my character falling when not grounded with a translate
but I can't set a negative Vector 3 value. Any ideas why and how I can get it working?

Also I'm having problems with my Ai fsm script. The Get Distance action does not update.
It only runs once and never again even though I trigger the state again (with/without every frame checked)
I submitted the problem a couple of days ago but I don't know if it got sent cause I haven't got a confirmation
so I'd though I'll post it here as well.

Cheers!
« Last Edit: June 13, 2012, 08:41:51 AM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Vector 3 Problem
« Reply #1 on: June 13, 2012, 05:39:23 AM »
Hi,

You can definitely input negative values on any numeric fields ( int, float, vector components, etc). what is your character made of in terms of components?

GetDistance. Are you sure you have all the fields properly filled out? if the gameObject or the target or the storeResult is null, then it will nto work. so it could work on start, but then for example the target was deleted and doesn't exists anymore. Could it be something like that?

 bye,

 Jean



MkAndersson

  • Guest
Re: Vector 3 Problem
« Reply #2 on: June 13, 2012, 07:54:58 AM »
/major facepalm... Yeah distance check works. I had set Player prefab not Player in scene.
Strange that it could calculate the correct distance anyway, even if it only was once.
But big thanks for pointing me in the right direction. Finally I can continue with my Ai.

Only the vector problem left then.
On my player character I'm using ex2D and have a character controller on it.
When I input -1 on Y it still goes upwards when I use translate.

Edit: Solved it. I put a negative number on Y speed and that fixed it.


Cheers!
« Last Edit: June 13, 2012, 07:58:08 AM by MkAndersson »