GithubHelp home page GithubHelp logo

Comments (9)

SonnyAD avatar SonnyAD commented on August 23, 2024

Hi

I have the same situation too. I have some fighters chasing ships and
sometimes the fighters have these movements. I guess it's related to the
precision of the prediction. My ships were static so far, now they are
moving slowly. I didn't notice so much improvements.
Did you try to put the prediction time to 0 on the SteerForEvasion,
Philippe? I didn't try.

Cheers,
Sonny Alves Dias

Le lun. 27 avr. 2015 à 17:30, Philippe Da Silva [email protected]
a écrit :

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.


Reply to this email directly or view it on GitHub
#33.

from unitysteer.

 avatar commented on August 23, 2024

The prediction time is actually set to 0 in the video I posted so I don't think that is related.
It seems to happens only when at a certain distance from the target. If you look on my video, you'll see that the ship continues in evasion for some distance before actually getting back to another steering behavior and it goes straight...

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...

from unitysteer.

ricardojmendez avatar ricardojmendez commented on August 23, 2024

@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).

from unitysteer.

 avatar commented on August 23, 2024

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.

from unitysteer.

 avatar commented on August 23, 2024

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:
Modifying the TickedLength value on a TickedVehicle or its subclasses, it won't update the value of the inner TickedObject because the actual Ticked Length is set on the TickedObject.TickLength property when the gameobject is enabled nor when it is modified.

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).
Thus, it would be great if the actual values could operate directly at runtime (in the Editor) so that we can test while playing in editor or even change the ticked length at runtime depending on the number of units that we may have to deal with...

Thanks.

from unitysteer.

ricardojmendez avatar ricardojmendez commented on August 23, 2024

However, I may have found a small bug or feature request depending on how you'll interpret it:
Modifying the TickedLength value on a TickedVehicle or its subclasses, it won't update the value of the inner TickedObject because the actual Ticked Length is set on the TickedObject.TickLength property when the gameobject is enabled nor when it is modified.

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").

from unitysteer.

 avatar commented on August 23, 2024

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

from unitysteer.

ricardojmendez avatar ricardojmendez commented on August 23, 2024

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.

from unitysteer.

 avatar commented on August 23, 2024

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 ;)

from unitysteer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.