2 registered members (Martin_HH, TipmyPip),
1,279
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Directing a particle effect in a tilt direction?
#77362
06/12/06 05:32
06/12/06 05:32
|
Joined: Sep 2003
Posts: 281 Arkansas\USA
raiden
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 281
Arkansas\USA
|
This should be doable, but my code produces no visible effect in any direction. The character is fixed at about -30 tilt, and the effect is supposed to be a simple beam from his eyes in the direction he is tilted. Code:
..... vec_for_vertex(vert1,me,455); vec_rotate(vert1,my.pan); vec_for_vertex(vert2,me,509); vec_rotate(vert2,my.pan); effect(photonBeam,1,vert1,velocity); effect(photonBeam,1,vert2,velocity); .....
I am sure the particles starting positions should be what is being effected and not the velocity, but I can't seem to get anything to make the particles move direction on the characters tilt. Thanks for your help -raiden
"It doesn't matter if we win or lose, it's how we make the game."-------------------- Links: 3DGS for Dummies
|
|
|
Re: Directing a particle effect in a tilt directio
[Re: Captain_Kiyaku]
#77364
06/12/06 07:48
06/12/06 07:48
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
Serious User
|
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
Try modify your code like the followings : Code:
function photonBeam() { my.skill_a = -random(5); // any number my.skill_b = 0; my.skill_c = 0;
vec_rotate(my.skill_a,you.pan); vec_add(my.vel_x, my.skill_a); my.move = on; my.size... my.bright... my.beam... ....... ....... }
vec_for_vertex(vert1,me,455); //vec_rotate(vert1,my.pan); vec_for_vertex(vert2,me,509); //vec_rotate(vert2,my.pan); effect(photonBeam,1,vert1,velocity); effect(photonBeam,1,vert2,velocity);
Last edited by vlau; 06/12/06 08:18.
|
|
|
Re: Directing a particle effect in a tilt directio
[Re: vlau]
#77366
06/16/06 04:23
06/16/06 04:23
|
Joined: Sep 2003
Posts: 281 Arkansas\USA
raiden
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 281
Arkansas\USA
|
Sorry for getting back so late on this, thank you both for the responses.
@vlau, your code worked perfectly, thank you.
@Grimber, that was my confusion, I was not sure if I was supposed to orient the start position of the particles, or the velocity, it's clear now that the velocity has to be directed in the angle directions for my effect.
Thanks again.
-raiden
"It doesn't matter if we win or lose, it's how we make the game."-------------------- Links: 3DGS for Dummies
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|