Solved Get velocity

Question that is answered or resolved.

O Ilusionista

Captain 100K
hi,

I want to get all my 3 velocities (x,y and z) from my char so I can build a friction code (since BOR doesn't have it).

how I get my velocity? Will this work?
Code:
getentityproperty(self,"velocity");
It will return an array with the values, or there is a way to get each velocity separated?
 
getentityproperty(self, "xdir") = x velocity
getentityproperty(self, "zdir") = z velocity
getentityproperty(self, "tossv") = y velocity
 
I'm going to depreciate those soon, as they pretty much have no logical rhyme or reason.

The new convention will be getentityproperty({ent}, "velocity", {sub})

{sub} = "x", "y", or "z".

Not ready yet, but coming very soon.
 
That's how they used to be in the engine's main code. I've recently replaced it and the position system with an axis struct.

This...

Code:
ent->base
ent->x
ent->a
ent->z

ent->xdir
ent->tossv
ent->zdir

is now this...

Code:
ent->position.base
ent->position.x
ent->position.y
ent->position.z

ent->velocity.x
ent->velocity.y
ent->velocity.z

That's part of what I was talking about with all the code cleanup. I had to get that stuff done before any substantial debugging or feature ads could take place. Just imagine trying to debug the old code for a minute, and you will quickly realize what I was (and am still because there is much more to do) up against.

DC
 
Back
Top Bottom