Hi
I would like to have group of 2D ants (sprites, or in my case particles projected on flat surface) walking from A to B point.
My problem is math. whats is not in nodes i can't write.
That's why i choice rather project particles on surface because they at least rotate…
Q.1. Could someone point me or explain me how to simply orient sprites to their direction of movement? (don't understand why its not an option). I have seen some threads on ODforum, but they are not to easy to follow.
Q.2. Particles after projection are still rotating in 3d space, how could i lock 2 axis rotation and allow rotation only
around Y?
i attached my try with projection
thanks
sprite rotation vs particle projection on surface
2691 3 2- Erikbartos
- Member
- 20 posts
- Joined: 11月 2016
- Offline
- mestela
- Member
- 1803 posts
- Joined: 5月 2006
- Online
I've only dabbled with the crowd nodes, but I was able to get a simple setup along the lines you described.
An agent terrain projection is meant to stick crowd characters or particles to a surface, works fairly well.
For orienting the cards that'll have the ant pic, you want 2 vectors, the normal of the surface they're walking on, and the direction they're facing. The terrain projection node provides the first, and the built in @v (velocity) provides the second. Copying the first vector to @N gives the copy to points sop what it needs to fix the cards.
The other things in the setup are nice-to-haves; I tried to make slightly more interesting motion of the particles with a few forces. An axis force pushes the ants away from the start point, a wind adds noise, and 2 interact forces do opposite things; one is a wide soft force to make the ants try and follow each other (sort of), and the other pushes them apart if they get too close.
An agent terrain projection is meant to stick crowd characters or particles to a surface, works fairly well.
For orienting the cards that'll have the ant pic, you want 2 vectors, the normal of the surface they're walking on, and the direction they're facing. The terrain projection node provides the first, and the built in @v (velocity) provides the second. Copying the first vector to @N gives the copy to points sop what it needs to fix the cards.
The other things in the setup are nice-to-haves; I tried to make slightly more interesting motion of the particles with a few forces. An axis force pushes the ants away from the start point, a wind adds noise, and 2 interact forces do opposite things; one is a wide soft force to make the ants try and follow each other (sort of), and the other pushes them apart if they get too close.
- Erikbartos
- Member
- 20 posts
- Joined: 11月 2016
- Offline
Heej wonderful !
I am still surprised how many nodes i haven't even see.
This is absolutely what i needed, you should release tutorial about it many people would find it helpful.
Could you please explain me what is the function of @v = normalize(@P); is it initial velocity from the position?
thanks a lot
I am still surprised how many nodes i haven't even see.
This is absolutely what i needed, you should release tutorial about it many people would find it helpful.
Could you please explain me what is the function of @v = normalize(@P); is it initial velocity from the position?
thanks a lot
- mestela
- Member
- 1803 posts
- Joined: 5月 2006
- Online
-
- Quick Links