Hi everyone!
I'm trying to translate this Unity-C#-Script to GDScript
This script implements quake 3 cpm-like movement in Unity, see this video of the original author: link
The basic movement on the ground is working fine but two things cause me some trouble:
1. jumping:
the character just does a minimal jump.. I guess it has to do something with the way that i'm checking if the player is colliding with the floor but i'm not sure
2. the function AirControl
:
if I don't move while jumping everything is fine but if do move while jumping playerVelocity.x and playerVelocity.z get very high (or very low depending on direction).
This is what I get in the console while jumping + moving forward (on negative z)
playerVelocity: (-31.217297, 0, -396.653412)
playerVelocity: (-5732674.5, -0.166667, -72840544)
playerVelocity: (-35501225092415464931328, -0.333333, -451085870939387686027264)
ERROR: move: Condition ' p_aabb.pos.x > 1e15 || p_aabb.pos.x < -1e15 ' is true.
At: core/math/octree.h:864.
ERROR: _set_transform: Object went too far away (more than 10000000mts from origin).
At: servers/physics/collision_object_sw.h:90.
ERROR: move: Condition ' p_aabb.pos.x > 1e15 || p_aabb.pos.x < -1e15 ' is true.
At: core/math/octree.h:864.
playerVelocity: (-inf, -0.5, -inf)
ERROR: _ensure_valid_root: Octree upper size limit reeached, does the AABB supplied contain NAN?
At: core/math/octree.h:587.
ERROR: move: Condition ' !common_parent ' is true.
At: core/math/octree.h:957.
playerVelocity: (-inf, -0.666667, -inf)
I pushed a minimal project to github
If I can do anything to make it easier for you to help me, please tell me :smile: