For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

footprints

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
Post Reply
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

footprints

Post by Smirftsch »

With the help from Raven i implemented a working version for Footprint support in Unreal. But the problem I have is that it doesn't determine strafe-steps correctly. So i need a way now to indicate if a player is strafing to adjust the generated footprints to it. Any suggestions are welcome ;)

local float FD;
local Vector X, Y, Z;
local float CheckFrame;

FD=0.7;
CheckFrame=0.5;

GetAxes(Rotator(Vector(Rotation)*Vect(1,1,0)), X, Y, Z);

if(AnimFrame < CheckFrame)
{
footpos = Location + CollisionRadius*FD*Y;
// Log("Left foot");
}
else
{
footpos = Location - CollisionRadius*FD*Y;
// Log("Right foot");
}

is the current function to determine the footsteps. Works fine for running/walking, but not for strafing.
Sometimes you have to lose a fight to win the war.
User avatar
TCP_Wolf
Administrator
Posts: 1078
Joined: Sun Mar 03, 2002 12:04 pm
Contact:

Re: footprints

Post by TCP_Wolf »

Umm... idea....? Would it be possible to calculate the degree-angle difference between viewrotation and movement-direction....? o_O
-=]HONESTY PAYS[=-
User avatar
Shivaxi
OldUnreal Member
Posts: 2232
Joined: Wed Mar 08, 2006 4:43 pm

Re: footprints

Post by Shivaxi »

OMFG OMF GOMF GOMFG OFMGOGMFGODGMOhgfiwf bifba erg ow :P

dude...thats fricken awsome...i dont got any suggestions cause im a noob at UScript...i stik to making maps and music :P Just wanted to say AWSOME!!!

could you export this as like a seperate mutator or something? cause i rly wanna see this lol...and put it on my server haha...it would be cool :P
Image  Image
User avatar
Turboman.
OldUnreal Member
Posts: 897
Joined: Tue Feb 04, 2003 6:40 pm

Re: footprints

Post by Turboman. »

NOTE: EDITED THIS POST!

i assume you're wondering if footsteps can rotate on an angle when strafing? i cannot help you myself here unfortunately, however i do believe it is easily possible as i've seen it before!

the Jazz Jackrabbit 3 alpha has that feature where you leave footsteps and they align depending on your strafe direction (FYI jj3 runs on an unmodified ut436 engine), unfortunately i cannot discuss the solution to this as this is rather unreleased "confidential" epic material (better PM me if you need to know more)


besides is it really necessary for footsteps to align depending on your strafing direction? i mean player models themselves in unreal completely lack strafing animations, as everyone has noticed strafing just leaves your player doing the "forward walk" anim while skidding sideways in a really lame way, would strafing anims be implented in the character models aswell?
and for that matter, does the unreal source code contain media material like unreal character animations in 3ds/biped format? cuz then its going to be a very easy job adding in strafing anims.
Last edited by Turboman. on Thu Aug 09, 2007 7:36 pm, edited 1 time in total.
User avatar
BrakeDanceJ
OldUnreal Member
Posts: 114
Joined: Sun Feb 08, 2004 10:00 pm

Re: footprints

Post by BrakeDanceJ »

NOTE: EDITED THIS POST!

i assume you're wondering if footsteps can rotate on an angle when strafing? i cannot help you myself here unfortunately, however i do believe it is easily possible as i've seen it before!

the Jazz Jackrabbit 3 alpha has that feature where you leave footsteps and they align depending on your strafe direction (FYI jj3 runs on an unmodified ut436 engine), unfortunately i cannot discuss the solution to this as this is rather unreleased "confidential" epic material (better PM me if you need to know more)


besides is it really necessary for footsteps to align depending on your strafing direction? i mean player models themselves in unreal completely lack strafing animations, as everyone has noticed strafing just leaves your player doing the "forward walk" anim while skidding sideways in a really lame way, would strafing anims be implented in the character models aswell?
and for that matter, does the unreal source code contain media material like unreal character animations in 3ds/biped format? cuz then its going to be a very easy job adding in strafing anims.
Speaking of..,
I'm not sure what legal terms Smirftsch is on with Epic RE the source-code; however, would you consider releasing the 3d files? It's sketchy trying to export them with tools like WOTgreal.
User avatar
Turboman.
OldUnreal Member
Posts: 897
Joined: Tue Feb 04, 2003 6:40 pm

Re: footprints

Post by Turboman. »

NOTE: EDITED THIS POST!

i assume you're wondering if footsteps can rotate on an angle when strafing? i cannot help you myself here unfortunately, however i do believe it is easily possible as i've seen it before!

the Jazz Jackrabbit 3 alpha has that feature where you leave footsteps and they align depending on your strafe direction (FYI jj3 runs on an unmodified ut436 engine), unfortunately i cannot discuss the solution to this as this is rather unreleased "confidential" epic material (better PM me if you need to know more)


besides is it really necessary for footsteps to align depending on your strafing direction? i mean player models themselves in unreal completely lack strafing animations, as everyone has noticed strafing just leaves your player doing the "forward walk" anim while skidding sideways in a really lame way, would strafing anims be implented in the character models aswell?
and for that matter, does the unreal source code contain media material like unreal character animations in 3ds/biped format? cuz then its going to be a very easy job adding in strafing anims.
Speaking of..,
I'm not sure what legal terms Smirftsch is on with Epic RE the source-code; however, would you consider releasing the 3d files? It's sketchy trying to export them with tools like WOTgreal.

i was actually intending to ask about that, i'm really curious if the source came with some source models aswell
since there is no way to decently get models out of the game, UCC batchexport works with about every unreal material but somehow gives an error when exporting models, and the freeware tool wotgreal and UTPT should NEVER be used because of some terrible bugs.

with the source models (possibly with the skeletal bipeds intact) would allow people to modify/fix alot of things that were broken/missing in the original game models (as i mentioned: strafing/backwalking animations aswell as weapon triangles)
Last edited by Turboman. on Fri Aug 10, 2007 12:38 am, edited 1 time in total.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: footprints

Post by Smirftsch »

all models are included as .3d files. If i am allowed to release them? I honestly have no real answer for that. In theory I should be, because anyone who owns the game is in theory already able to export them. But I never got a clear answer about that from them.
Last edited by Smirftsch on Fri Aug 10, 2007 7:16 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
asgard12000
OldUnreal Member
Posts: 254
Joined: Mon Aug 15, 2005 2:46 pm

Re: footprints

Post by asgard12000 »

Code: Select all


local float strafemag;
local vector rot, vel, footpos;
local rotator newrot; 
local float FD;
local Vector X, Y, Z;
local float CheckFrame;

 // GetAxes(Rotator(Vector(Rotation)*Vect(1,1,0)), X, Y, Z);
 // above eh? not needed
 GetAxes(Rotation, X, Y, Z);
 FD=0.7;
 CheckFrame=0.5;
if(AnimFrame < CheckFrame)  // left foot and right was mixed up
 {                                                 //remove height
        footpos = Location - CollisionRadius*FD*Y - CollisionHeight*z;
      //  footpos = Location + CollisionRadius*FD*Y; 
//  Log("Left foot"); 
 } 
 else                                              //remove height
 {      footpos = Location + CollisionRadius*FD*Y - CollisionHeight*z;
       // footpos = Location - CollisionRadius*FD*Y; 
//  Log("Right foot"); 
 }

 vel=Normal(velocity); //direction
 vel.z=0;
 rot =Normal(Vector(rotation)); //direction
 rot.z=0;

 strafemag = rot dot vel; // the angle between the way im facing and travelling
                          // dot value cosine  of the 2 directions

//*************************************
// broadcast strafemag for testing  REMOVE
if  (strafemag > 0.8 || strafemag < -0.8)
    BroadcastMessage( " Im walking forwards or backwards"$strafemag, false, 'say' );

else
   BroadcastMessage( " Im strafing sideways or forwards or backwards"$strafemag, false, 'say' );
//*************************************
if  ( strafemag < -0.5)  // always face forward
  rot= Normal(rot + vel* -1); // split the diference
else
  rot= Normal(rot + vel); // split the diference

  newrot=rotator(rot);   
 //spawn the test class arr
 Spawn(class 'arr',,, footpos,newrot);

test class

Code: Select all


class arr extends effects;

defaultproperties
{
     RemoteRole=ROLE_SimulatedProxy
     DrawType=DT_Mesh
     Texture=Texture'UnrealI.Skins.JFlag11'
     Mesh=LodMesh'UnrealShare.ArrowM'
     Lifespan=4.0
}
This is to add rotation (I assume thats what you were asking?)

Also not all classes might start left footed (duno) You could add a left/right foot option, or not bother :)

Cheers


Last edited by asgard12000 on Wed Aug 22, 2007 11:41 am, edited 1 time in total.
User avatar
Shivaxi
OldUnreal Member
Posts: 2232
Joined: Wed Mar 08, 2006 4:43 pm

Re: footprints

Post by Shivaxi »

omfg asgard is pwnage ;D
Image  Image
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: footprints

Post by Smirftsch »

omfg asgard is pwnage ;D
yes he is ;)
Thx asgard, will try.
Sometimes you have to lose a fight to win the war.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: footprints

Post by Smirftsch »

ha !
works :P
Now basically footprints are working. Now i "only" need to make different footprints for right and left foot, then add it to all playerclasses with different footprint-types and the monsters need specific footprints too of course.
Last edited by Smirftsch on Wed Aug 29, 2007 5:56 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: footprints

Post by Smirftsch »

so, left foot and right foot are working now too with different decals...:)
Last edited by Smirftsch on Wed Aug 29, 2007 6:16 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
asgard12000
OldUnreal Member
Posts: 254
Joined: Mon Aug 15, 2005 2:46 pm

Re: footprints

Post by asgard12000 »

Well it Kind of does :)

Do you have a method to attach it to the surface so its aligned?
eg the first example is no good if walking up a hill and was only to give you the rotation for strafing

heres a scripted ver if you dont but it uses trace and footprints can hang over edges

Code: Select all

local float strafemag;
local vector rot, vel, footpos;
local rotator newrot; 
local float FD;
local Vector X, Y, Z;
local float CheckFrame;

//new stuff
local actor HitActor;
local vector HitLocation, HitNormal, Endtrace;
local rotator spawnrot;
local vector vec;
 // GetAxes(Rotator(Vector(Rotation)*Vect(1,1,0)), X, Y, Z);
 // above eh? not needed
 GetAxes(Rotation, X, Y, Z);
 FD=0.7;
 CheckFrame=0.5;
if(AnimFrame < CheckFrame)  // left foot and right was mixed up
 {                                                 //remove height
        footpos = Location - CollisionRadius*FD*Y - CollisionHeight*z;
      //  footpos = Location + CollisionRadius*FD*Y; 
//  Log("Left foot"); 
 } 
 else                                              //remove height
 {      footpos = Location + CollisionRadius*FD*Y - CollisionHeight*z;
       // footpos = Location - CollisionRadius*FD*Y; 
//  Log("Right foot"); 
 }

 vel=Normal(velocity); //direction
 vel.z=0;
 rot =Normal(Vector(rotation)); //direction
 rot.z=0;

 strafemag = rot dot vel; // the angle between the way im facing and travelling
                          // dot value cosine  of the 2 directions

//*************************************
// broadcast strafemag for testing  REMOVE
if  (strafemag > 0.8 || strafemag < -0.8)
    BroadcastMessage( " Im walking forwards or backwards"$strafemag, false, 'say' );

else
   BroadcastMessage( " Im strafing sideways or forwards or backwards"$strafemag, false, 'say' );
//*************************************
if  ( strafemag < -0.5)  // always face forward
  rot= Normal(rot + vel* -1); // split the diference
else
  rot= Normal(rot + vel); // split the diference

  newrot=rotator(rot);   
 //spawn the test class arr 

 // end trace
 Endtrace=footpos + (maxstepheight+10) * Vect(0,0,-1);

 HitActor = Trace(HitLocation, HitNormal, Endtrace, footpos, true);
 if (HitActor!=None)
 {
  vec =(Vector(newrot) dot Hitnormal)*Hitnormal;
  vec=vector(newrot)-vec;    // align to surface
  spawnrot=Rotator(vec);     
  Spawn(class 'arr',,, HitLocation,spawnrot);
 }
Last edited by asgard12000 on Thu Aug 30, 2007 7:20 am, edited 1 time in total.
User avatar
asgard12000
OldUnreal Member
Posts: 254
Joined: Mon Aug 15, 2005 2:46 pm

Re: footprints

Post by asgard12000 »

Also the checkframe thing is no good if the animation doesnt play the whole way thro. eg take lots of tiny steps

You may have to add it to tweentowaiting so that it spawns the right foot (opposite foot) aswell or some such (one spawn) (havent given it much thought)

If trying this at home :) the panel mesh could be used with a footprint texture (note if using the panel mesh the texture needs to be upside down.


cheers
Last edited by asgard12000 on Thu Aug 30, 2007 7:19 am, edited 1 time in total.
User avatar
Shivaxi
OldUnreal Member
Posts: 2232
Joined: Wed Mar 08, 2006 4:43 pm

Re: footprints

Post by Shivaxi »

asgard=STILL PWNAGE!!! lol

also would it be possible to make animations for the playerpawn char's without breaking compatibilty? cause then someone could make a strafing left and right animation :P
Image  Image
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: footprints

Post by Smirftsch »

Also the checkframe thing is no good if the animation doesnt play the whole way thro. eg take lots of tiny steps

You may have to add it to tweentowaiting so that it spawns the right foot (opposite foot) aswell or some such (one spawn) (havent given it much thought)

If trying this at home :) the panel mesh could be used with a footprint texture (note if using the panel mesh the texture needs to be upside down.


cheers
yes, thats exactly one of the problems. Nothing very critical, but if it would consider small steps also, including spawning the decal for both feet, it would be perfect.
For the tracing method where the decal has to be spawned, i'm using basicly the tracing method implemented already in UT, which seems to work fine on edges as well, so this shouldnt be a problem. Can send you the whole stuff Asgard, if you want to check it out.
Sometimes you have to lose a fight to win the war.
User avatar
asgard12000
OldUnreal Member
Posts: 254
Joined: Mon Aug 15, 2005 2:46 pm

Re: footprints

Post by asgard12000 »

The attachment to the surface is much better done the native way rather than expensive traces :)

If youre not having problems with it theres no need to send it. I'm about out of time for scripting projects atm anyway.

Otherwise you can send it and I may be able to suggest a couple of things.
Such as looking at tweentowaiting
if (animsequence == somerunning || animsequence == somewalking || etc etc)
do my stuff

Cheers

Asgard != pwnage  Asgard = enough to get by
Last edited by asgard12000 on Sun Sep 09, 2007 2:28 am, edited 1 time in total.
User avatar
Shivaxi
OldUnreal Member
Posts: 2232
Joined: Wed Mar 08, 2006 4:43 pm

Re: footprints

Post by Shivaxi »

Asgard != pwnage Asgard = enough to get by
lol! :D
Image  Image
Post Reply

Return to “UScript Board”