Skip to content
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

Positions not constrained within flyrect #1

Open
nesdnuma opened this issue Nov 14, 2018 · 2 comments
Open

Positions not constrained within flyrect #1

nesdnuma opened this issue Nov 14, 2018 · 2 comments

Comments

@nesdnuma
Copy link

Hello,

I have been using the Windows 64bit version of jit.boids3d provided on the Max forums. I have been trying to adapt it to control specific ranges of data for non-Jitter patches. However, when compared to boids2d, the positions with jit.boids3d go much beyond the values defined for flyrect. Is there any way to keep them inside a defined range?

@diablodale
Copy link
Owner

Hello. I don't have the current knowledge/remembering to help you with that. As I looked at the commits, I only made the minimal changes needed to get it to compile.

A quick look at the code suggests to me that the flyrect defines the relative boundaries of a flock, not the boundaries of the world.

This is the start of the code which seems to govern the behavior of a boid with the flock's flyrect. It seems to apply a change to velocity and not a hard limit to location.

/* if test point is out of the left (right) side of flockPtr->flyrect, */

@nesdnuma
Copy link
Author

Oh, I see. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants