playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DarnVisages

Pages: [1]
1
PlayMaker Help / Re: Smooth Look At 2D bug?
« on: August 16, 2019, 12:41:29 PM »
Hi,

Awesome. Nope, I’m not part of the beta.

Thanks

2
I initially posted this as a help topic here:
https://hutonggames.com/playmakerforum/index.php?topic=20927.0

After looking into it further, I believe there is a bug in the code for the "Smooth Look At 2D" action.

If a Finish Event is set, the event is called before getting below the Finish Tolerance.

These lines are in the script (starting at line 142):
Code: [Select]
//var targetDir = lookAtPos - go.transform.position;
//var angle = Vector3.Angle(targetDir, go.transform.right) - rotationOffset.Value;
var angle = Vector3.Angle(desiredRotation.eulerAngles,lastRotation.eulerAngles);

If I log the 'angle' variable to the console, it's always 0, no matter what. But when I un-commented the first two lines and commented the third line, the action began functioning correctly and giving the correct delta angle, and then correctly exiting with the Finish Event at the right time.

Please let me know if any more info is needed.

Thanks.

3
PlayMaker Help / Re: Smooth Look At 2D bug?
« on: August 08, 2019, 08:58:16 AM »
Hi Again,

So I'm pretty sure this is a bug after all.  In the script for Smooth Look At 2D, there are these lines (starting at line 142):

Code: [Select]
//var targetDir = lookAtPos - go.transform.position;
//var angle = Vector3.Angle(targetDir, go.transform.right) - rotationOffset.Value;
var angle = Vector3.Angle(desiredRotation.eulerAngles,lastRotation.eulerAngles);

I tried un-commenting the first 2 lines, and commenting out the third line, and the state machine began working as expected. 

I believe the third line is always returning 0, making it mistakenly determine the object is always under the finish tolerance, and thus exit after only a single frame every time.

I'll report this as a bug, in case the first two lines still have issues and it should be looked at closer.

Thanks.

4
PlayMaker Help / Re: Smooth Look At 2D bug?
« on: August 07, 2019, 11:31:35 PM »
Hi Jean,

Thank you for the response!

No, I don’t believe it’s starting when already below the finish tolerance (which is set to 1). It’s stopping when pointing visibly far off. Regardless of the starting position it rotates only a couple degrees then stops. It will only keep turning and stop at the correct alignment if I set the finish event to none.

Yes, the finish event I’m using is custom, simply called “Stop Tracking”

Thanks

EDIT: Please see my original post, I made a video with a use-case demonstrating the issue.

5
PlayMaker Help / Smooth Look At 2D bug?
« on: August 07, 2019, 08:30:52 PM »
Hi,

I'm new to Playmaker, so I hope this is just user error.  When I set up a state with the "Smooth Look At 2D" action, my GameObject starts to toward the target object briefly, but stops after maybe a frame, before reaching the correct rotation.

I have the Finish Tolerance set at 1 degree, and have assigned a Finish Event, but it is launching the finish event way before it ever reaches the correct look vector.

If I clear the Finish Event to none, the state will complete the full rotation until it is looking the correct direction, but never exits (just continues to keep looking at the target object, while it moves or not).  But then I have no way to make it exit.

Please let me know if I'm missing something or misunderstanding how to use the Finish Tolerance/Event.

Thanks!

EDIT:  Here's a video where I'm demonstrating the issue. I'm trying to get it to do the smooth-look back and forth between two objects:
https://drive.google.com/open?id=1w2b6Huk-qnWSxc-Rzcnjwblkk4GFtuWC

Pages: [1]