Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Member
raiden  Offline 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: raiden] #77363
06/12/06 05:51
06/12/06 05:51
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
where is the rest of the effect? maybe the particles get killed too fast.


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
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
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

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] #77365
06/13/06 09:01
06/13/06 09:01
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
your 'velocity' vector value your passing is an ABSOLUTE direction/velocity vector.

I don't see you doing any direction vector calculation from vert1 to vert 2 ( im assuming you want the beam to move from vert1 to vert 2 direction here)
and storing that into 'velocity'

so i think that may be your problem

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 Offline OP
Member
raiden  Offline 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

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1