Character movement measurements?

Chickenfield

New member
Hi!

I'm currently tweaking the movement of my character. For that, I'd like to measure them. For example, I want to know how far he can jump, what is the max height he can reach and how much airtime is it. I'd also like to know this for other (custom made) abilites. I couldn't think of a good (automated) way to find that out, and Google didn't help yet either.

Can you give me some hints on this?

Thanks and best regards,
Patrick
 
Attach a gameObject with a script that measures... startpos = pos, when starting(you can find events to register to for pretty much everything OnCharacterGrounded will fire false for example), endPos = pos when finished again there's and event for this you can use OnCharacterGrounded or OnCharacterLand. distance = Vector 3.Distance(new Vector3(endPos.x, 0, endPos.z), new Vector3(startpos.x,0,startpos.z); height = endPos.y - startPos.y; airTime do the same except start a timer instead or use startTime - endTime.
 
Thanks for the input! That already gives me a way to go.

But how can I measure this without having to manually do the jump?
 
You can't calculate the height/distance of the jump ability, so you have to do measurements. You will also get different results per measurement, as height and distance depend on the prior character movement, movement in the air (jump allows to change direction while in the air), and the terrain.
 
Top