0 registered members (),
16,302
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
how to make entity2 move around entity1?
#324613
05/22/10 09:57
05/22/10 09:57
|
Joined: Nov 2008
Posts: 196 the wrong place
Muhsin
OP
Member
|
OP
Member
Joined: Nov 2008
Posts: 196
the wrong place
|
Hi! how do i do this:  How do I make entity2 pan around entity1, when entity1 is paning? thanks - Muhsin Kaymak
Come and play my new browsergame - Valley Of Wolves: http://www.mafiacreator.com/ValleyOfWolvesHurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it! And be the most feared MafiaBoss in the World!!
|
|
|
Re: how to make entity2 move around entity1?
[Re: Superku]
#324618
05/22/10 10:21
05/22/10 10:21
|
Joined: Nov 2008
Posts: 196 the wrong place
Muhsin
OP
Member
|
OP
Member
Joined: Nov 2008
Posts: 196
the wrong place
|
thanks, it works!
- Muhsin Kaymak
Come and play my new browsergame - Valley Of Wolves: http://www.mafiacreator.com/ValleyOfWolvesHurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it! And be the most feared MafiaBoss in the World!!
|
|
|
Re: how to make entity2 move around entity1?
[Re: Muhsin]
#324714
05/22/10 20:00
05/22/10 20:00
|
Joined: Nov 2008
Posts: 196 the wrong place
Muhsin
OP
Member
|
OP
Member
Joined: Nov 2008
Posts: 196
the wrong place
|
I got another question:
how can I choose a specific position for entity2, so it still moves around entity1 and is, lets say 50 quants back and 150 quants left of entity1, if you understand?
thanks!
- Muhsin Kaymak
Come and play my new browsergame - Valley Of Wolves: http://www.mafiacreator.com/ValleyOfWolvesHurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it! And be the most feared MafiaBoss in the World!!
|
|
|
Re: how to make entity2 move around entity1?
[Re: Muhsin]
#324716
05/22/10 20:02
05/22/10 20:02
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
var extra_ang = 20; var distance = 200; ent2.x = ent1.x-distance *sin(ent1.pan + extra_ang ); ent2.y = ent1.y-distance *cos(ent1.pan + extra_ang );
Last edited by Quadraxas; 05/22/10 20:03.
3333333333
|
|
|
Re: how to make entity2 move around entity1?
[Re: Quad]
#324721
05/22/10 20:41
05/22/10 20:41
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
"how can I choose a specific position for entity2, so it still moves around entity1 and is, lets say 50 quants back and 150 quants left of entity1, if you understand?"
As I've said before, use vec_rotate:
vec_set(ent2.x,vector(-50,150,0)); vec_rotate(ent2.x,ent1.pan); vec_add(ent2.x,ent1.x);
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: how to make entity2 move around entity1?
[Re: Superku]
#324726
05/22/10 21:09
05/22/10 21:09
|
Joined: Nov 2008
Posts: 196 the wrong place
Muhsin
OP
Member
|
OP
Member
Joined: Nov 2008
Posts: 196
the wrong place
|
Thanks for the answers!
I tried out Quadraxes answer, and it worked.
Thanks!
- Muhsin Kaymak
Come and play my new browsergame - Valley Of Wolves: http://www.mafiacreator.com/ValleyOfWolvesHurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it! And be the most feared MafiaBoss in the World!!
|
|
|
|