Well here is the scenario....
I decided to extend my blood drop effect, with a version that would
bounce around and slide off across the floor.
Ideally the drops would stick to a wall when they hit it, and then drip down.
Would randomize the rate of dripping once I got that too work.
Figured out a way via trial and error to get things almost working the way
they should for it. Took me a while as almost everything I tried had
the opposite effect of what I was wanting. Of course if I reverse it at
that point, nothing happened....
Only problems with current version is that the drops will slide up ramps
or inclined surfaces, which don't look quite right... And when they
stick to the wall, they stop instead of sliding down.
Had a number of versions where the drops would climb up the walls and
stick to the ceiling until their timers ran out, but cant get it to do the
opposite.
Also the drop seem to jump at the wall and stick to it at about the current
bounce height when they get real close. Like they are magnets and
the wall is steel.
It would be better if they stopped or headed downhill, if heading downhill
was available at that location.
I searched the Wiki's and the web for info on vectors and projectiles, but
found very little that helped me with this.
Server here is running the current version of this: 69.210.212.204:7877
Code below probably has some problems, but it is the closest I have gotten
so far to what I want. Most likely some unneeded stuff in it I put in
during attempts to get the drops from climbing to the roof.....
Note: SpurtLevel2 is a config variable. Range has been 20..110 in testing.
Any feedback would be good. Links to a Wiki page or tutorial I failed to find
that might shed some light, names of some other Vectors or variables other
than Velocity that might effect this.
If some quick, easy fix to the above pops into your head, feel free to post
that also....
Thanks for looking.
I decided to extend my blood drop effect, with a version that would
bounce around and slide off across the floor.
Ideally the drops would stick to a wall when they hit it, and then drip down.
Would randomize the rate of dripping once I got that too work.
Figured out a way via trial and error to get things almost working the way
they should for it. Took me a while as almost everything I tried had
the opposite effect of what I was wanting. Of course if I reverse it at
that point, nothing happened....
Only problems with current version is that the drops will slide up ramps
or inclined surfaces, which don't look quite right... And when they
stick to the wall, they stop instead of sliding down.
Had a number of versions where the drops would climb up the walls and
stick to the ceiling until their timers ran out, but cant get it to do the
opposite.
Also the drop seem to jump at the wall and stick to it at about the current
bounce height when they get real close. Like they are magnets and
the wall is steel.
It would be better if they stopped or headed downhill, if heading downhill
was available at that location.
I searched the Wiki's and the web for info on vectors and projectiles, but
found very little that helped me with this.
Server here is running the current version of this: 69.210.212.204:7877
Code below probably has some problems, but it is the closest I have gotten
so far to what I want. Most likely some unneeded stuff in it I put in
during attempts to get the drops from climbing to the roof.....
Note: SpurtLevel2 is a config variable. Range has been 20..110 in testing.
Code:
//=============================================================================
// utb_BloodDrop2.
//=============================================================================
class UTB_BloodDrop2 extends UTB_BloodDrop;
simulated function PostBeginPlay()
{
Super.PostBeginPlay();
if (Level.NetMode != NM_DedicatedServer)
{
Velocity.x += (FRand()*class'MB5.MB'.default.SpurtLevel2) + 2;
Velocity.y += (FRand()*class'MB5.MB'.default.SpurtLevel2) + (class'MB5.MB'.default.SpurtLevel2 / 2);
Velocity.z += (FRand()*class'MB5.MB'.default.SpurtLevel2) + (class'MB5.MB'.default.SpurtLevel2);
}
}
simulated function HitWall( vector HitNormal, actor Wall )
{
if (Level.NetMode != NM_DedicatedServer)
{
Velocity.x -= (FRand()*(10) + 2);
Velocity.y -= (FRand()*(10) + 2);
Velocity.z += (FRand()*(class'MB5.MB'.default.SpurtLevel2) * 2);
}
}
simulated function Landed( vector HitNormal )
{
if (Level.NetMode != NM_DedicatedServer)
{
Velocity.x = (Velocity.x * -1);
Velocity.y = (Velocity.y * -1);
Velocity.z = (Velocity.z * -1);
}
}
defaultproperties
{
}
Any feedback would be good. Links to a Wiki page or tutorial I failed to find
that might shed some light, names of some other Vectors or variables other
than Velocity that might effect this.
If some quick, easy fix to the above pops into your head, feel free to post
that also....
Thanks for looking.