-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behavior on Evasion when target doesn't move #33
Comments
Hi I have the same situation too. I have some fighters chasing ships and Cheers, Le lun. 27 avr. 2015 à 17:30, Philippe Da Silva notifications@github.com
|
The prediction time is actually set to 0 in the video I posted so I don't think that is related. Might be a precision issue. I'll try to investigate a bit more. Otherwise, I'll have to go for another solution such as randomly defining a flee point and using a SteerForPoint instead... |
@Indiefreaks Do you have a small repro case? Any other behaviors attached to the object? If I had to blindly guess, I'd suggest you start by increasing how often the vehicle updates its steerings (I think the default is 0.1s). |
I made the video so that you can see the other components and their properties (if you pause the video, you'll be able to see them clearly :p) I'll try the updates property tweak to see if that changes anything. |
Ok, I made the test and reduced the TickedLength value from 0.1 to 0.01 and it made the trick. My spaceships now don't "fish" as before. However, I may have found a small bug or feature request depending on how you'll interpret it: I don't know how this system works so I didn't made a change on the code (especially if it handles multithreading in the background which could lead to even worse bugs if not done properly). Thanks. |
You are correct, it is set only when the TickedObject is created OnEnable. There is no multithreading, as Unity wouldn't be able to take it, and instead things are handled through a TickedPriorityQueue which means you could just change the value on the TickedObject yourself and the change will take effect after the next time it's ticked (since iirc it's used to set a "next tick time"). |
Should I go throught a pull request with some additions to the TickedVehicle class where you'd be able to change the value from the Inspector and see it applied in the TickedObject instance ? Thanks |
Sure, go ahead. I may not merge it right away, since I want to make sure nothing else breaks, but it'll be useful to have. |
Ok, I'll have a go and let you know about it. For that, I'll create a new feature request in the ticket system. Cheers and thanks for the help ;) |
Hi Ricardo,
It's me again :P
I have a bizarre behavior with the steerforevasion component when the target isn't moving at all: they kinda flee like fishes :p while I would expect a straight movement instead.
I've posted a small video on Youtube to illustrate that. Note that this is valid for all instances I used.
https://youtu.be/2x-lP3VzXZ0
Thanks for letting me know if you see what I could do to remove this behavior.
The text was updated successfully, but these errors were encountered: