Fossil Fighters Eclipse Programmer Casting Call! + Movement controls invert

Godot Version

Godot Version 3.5

I’ve been to this forum a few times and the biggest problem I encounter is communication, namely the difficulty in conveying a problem to people who don’t have the full file and as such can’t find the problems that I’m too dumb to sus out. As such I have made the decision to do two things. One is to post a coders casting call for you guys to apply to contribute to the project. VERY IMPORTANT NOTE: Our budget is a pack of fruit snacks and a dream, as such all work for the project is volunteer work. While we are planning to open a patreon, but that’s not going to be until we have a proof of concept in the form of a playable demo.
Here is the application forum to join the dev team, and again this is volunteer work.

Option 2 is for me to make the project file available here for you guys to directly check. This is more direct method, but more risky. I trust that you guys will be normal about it and not malicious, but I wont link it here yet.

To conclude this post, I’ll leave you off with this bug I found while trying to clean up the code for climbing.


As seen in the video, the player character flips when climbing, this is because the controls are being inverted.
here is my climbing code:

#climbing
func climbing() -> void:
	#check if player is able to climb
	if wall_check.is_colliding():
		if still_on_wall_check.is_colliding():
			if Input.is_action_just_pressed("jump"):
				
				is_climbing = not is_climbing
				#if is_on_floor():
					#is_climbing  = false
				#else:
					#is_climbing = true
		else:
			#if player is at top of a climb, boost them over the top
			jump()
			yield(get_tree().create_timer(0.3), "timeout")
			is_climbing = false
	else:
		is_climbing = false
	
	if is_climbing:
		#if player is climbing disable gravity
		gravity_active = false
		current_speed = climb_speed
		direction = Vector3.ZERO
		gravity_vec = Vector3.ZERO
		
		#sticks player to the wall
		stick_point_holder.global_transform.origin = wall_check.get_collision_point()
		self.global_transform.origin.x = stick_point.global_transform.origin.x
		self.global_transform.origin.z = stick_point.global_transform.origin.z
		
		#move player relative to the walls normal
		var rot = -(atan2(wall_check.get_collision_normal().z, wall_check.get_collision_normal().x) - PI/2)
		var f_input = Input.get_action_strength("move_forward") - Input.get_action_strength("move_backwards")
		var h_input = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
		direction = Vector3(h_input, f_input, 0).rotated(Vector3.UP, rot).normalized() 
	else:
		gravity_active = true
		current_speed = max_speed
		
func _process(delta):
	#turns body in the direction of movement
	if direction != Vector3.ZERO and !is_climbing:
		mesh.rotation.y = lerp_angle(mesh.rotation.y, atan2(-direction.x, -direction.z), angular_velocity * delta)
	elif direction != Vector3.ZERO and is_climbing:
		mesh.rotation.y = -(atan2(wall_check.get_collision_normal().z, wall_check.get_collision_normal().x) - PI/2)

here is my inputs:

Looks like your rotation is not dependent on the input while climbing, only on the wall’s normal. If you don’t substract PI/2 from the rotation it should fix it I guess:
mesh.rotation.y = -(atan2(wall_check.get_collision_normal().z, wall_check.get_collision_normal().x))

As for the input you can use negative f_input here:
direction = Vector3(h_input, -f_input, 0).rotated(Vector3.UP, rot).normalized()
For forward/backward movement -Z is forward usually, but for vertical movement +Y is upwards, so the forward input should be made negative in one case, that might be the problem.

ok, that solved that issue. I’m just just gonna leave this post marked as unsolved so people can comment about the casting call.

1 Like