playMaker

Author Topic: Get position (may be a bug)  (Read 1531 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Get position (may be a bug)
« on: July 30, 2014, 01:57:25 PM »
EDIT: I'm a noob... This is a user-issue and not a PM issue.

TL-DR: Get Position is getting incorrect values that differ slightly which is causing a noticeable jitter effect sometimes when using it to control my camera system.

So, I've been working away on the systems for a game and I've come across something that might be a bug and I've been able to narrow it down to the "Get Position" action.

Basically, I have a player object that the camera is made to follow... It's using the get position action. When I play it, sometimes I'll get a jittering effect (in the Camera) that when the player is still, the camera is set to make it's position locked on the player (well, technically it's a unit forwards but that's not the issue.) When the player is still, sometimes the jitter happens and I've been able to isolate it to the Get Position action. (This is in both self and world space.)

The value, when it's still is going between (where it's sitting right now as I'm previewing) between 11.8671 and 11.86608... But the player's transform is at 11.86852 and holding steady at that position.

I'm going to take a peek at the action's script itself to see if there's something in there.

And yeah, I've tried feeding that information through an algorithm to round to a certain decimal... When I round it to one decimal place the jittering goes away but then that results in the camera moving at visible increments so that's not really an acceptable solution for what I'm going for. I've tried to two decimal places and the jittering still occurs.

Anyone have any ideas here? Is this a bug in the action or the system itself?

If it helps, I'm running 1.7.7.f6 on Unity 4.3.4f1 and have the Conditional expression system installed.

EDIT: I looked at the code itself and from my not-very-educated eyes it's not showing me anything out of the ordinary... At least not that I can really parse... I'm going to see about testing a couple different iterations here to see if I can further narrow down what's going on.

Another EDIT: And yeah, I've just tested it with sending the values to both a float and a vector3 variable (exposed in the inspector and the action firing off every frame and in a timed cycle. It's still producing it with a "Wait" controlled (at a small and a large time-period) as well as a "Next Frame Event" cycle.

Musing on it, unless there's something obscured here, I'm wondering if this is something in the DLL/package itself? Was there some coding-mojo happening with the interfacing of the float/vector values that might be making this happen?

EDIT: Hmm... I'm troubleshooting and I may be close to finding the bug. I'll post an update when I know more.
« Last Edit: July 30, 2014, 02:48:46 PM by Red »

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get position (may be a bug)
« Reply #1 on: July 30, 2014, 02:32:54 PM »
Found it... And it doesn't look to be an issue with playmaker but the way I was using some position controlling systems.

See, I have a system set up that has my own gravity system applied and to get around some issues with sliding around and such I've used a "Set position" with a late-update toggled... So, that's basically over-riding the position of the player information somehow (still unsure how though because the transform information in the inspector didn't present this jittering effect.)

So disregard the worries... Apologies on my end as it's terribly embarrassing to realize that what I thought could have been a possible bug was a user-error issue.