Ability Start Location not working

Mim

New member
Hi. I mean it's working. But randomly.

I copied Nolan's values for the opening door ability. The ability itself doesn't matter to me for now. I just want to be able to set the conditions under which it can start.
I set interactable just like the documentation said. I want to start the ability at any location and with any rotation inside the trigger box (that's why Size, Distance, and Angle values are so high). CanStartAbility() returns true randomly. Sometimes inside orange box, sometimes outside it. Sometimes when I look at the mesh, sometimes when I turn my back on it. I see no pattern. What's wrong?


imagea.jpgimageb.jpg
 
When CanStartAbility returns false what part is returning false? Are you able to reproduce the problem within the demo scene?
 
Yes. You can see for yourself. I only changed the green and orange boxes (and deleted other interactable objects from the scene):


boxes.png


Nolan is currently at a position he should be able to interact. But he won't. If he leaves the boxes and returns, then he'll maybe.

CanStartAbility returns false here:

logs.png

Please look at the numbers. I find it strange that the function is called every frame (I guess it's every frame), because:

/// <summary>
/// Called when the ablity is tried to be started. If false is returned then the ability will not be started.
/// </summary>

Shouldn't it be called only when I press "action"?
 
I am having a tough time seeing exactly what you changed - can you paste the values of any transform changes that you made?

Shouldn't it be called only when I press "action"?
This relates to the ability message. In version 2.1 there is an option which allows you to specify if it should check for the ability message.
 
1. Size of the box collider.
2. Size of the orange square, angle, and distance on Ability Start Location.

You can see all the values by looking at the first screenshot I pasted in this thread.
 
Last edited:
Thanks - I was able to reproduce it and will have it fixed in version 2.1 which should be released on the Asset Store early next week.
 
Hurray. Please have look at the rotation issue as well. Even if a trigger is entered, look direction is not working properly.
 
Even if a trigger is entered, look direction is not working properly.
For the ability start location you specified an angle of 360 so with that value it'll allow any look direction.
 
I'm not talking about the same case. If you want me to, I can also upload screenshots where angle doesn't work as it should.
 
Top