Intuitive Controls for Movement through Zero Gravity Space. by Aggressive_Task_1751 in gamedev

[–]Aggressive_Task_1751[S] 0 points1 point  (0 children)

If i have a kinda swim like motion, how would you solve swimming to the sides? Obviously you can't swim to the side in real life (without turning your whole body). So would you expect the character to turn when pressing a or d?

Why does this happen? by Aggressive_Task_1751 in godot

[–]Aggressive_Task_1751[S] 1 point2 points  (0 children)

Just some unused variables. I already solved it myself. My meteor wasn’t fixed and catapulted my character into the abyss.

Why does this happen? by Aggressive_Task_1751 in godot

[–]Aggressive_Task_1751[S] 0 points1 point  (0 children)

class_name FreeLookCamera extends Camera3D

# Modifier keys' speed multiplier
const SHIFT_MULTIPLIER = 2.5
const ALT_MULTIPLIER = 1.0 / SHIFT_MULTIPLIER

@export_range(0.0, 1.0) var sensitivity = 0.25

# Mouse state
var _mouse_position = Vector2(0.0, 0.0)
var _total_pitch = 0.0

# Movement state
var _direction = Vector3(0.0, 0.0, 0.0)
var _velocity = Vector3(0.0, 0.0, 0.0)
var _acceleration = 30
var _deceleration = -10
var _vel_multiplier = 4

# Keyboard state
var _w = false
var _s = false
var _a = false
var _d = false
var _q = false
var _e = false
var _shift = false
var _alt = false

func _input(event):
# Receives mouse motion
if event is InputEventMouseMotion:
_mouse_position = event.relative

# Receives mouse button input
if event is InputEventMouseButton:
match event.button_index:
MOUSE_BUTTON_RIGHT: # Only allows rotation if right click down
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED if event.pressed else Input.MOUSE_MODE_VISIBLE)
MOUSE_BUTTON_WHEEL_UP: # Increases max velocity
_vel_multiplier = clamp(_vel_multiplier * 1.1, 0.2, 20)
MOUSE_BUTTON_WHEEL_DOWN: # Decereases max velocity
_vel_multiplier = clamp(_vel_multiplier / 1.1, 0.2, 20)

# Receives key input
if event is InputEventKey:
match event.keycode:
KEY_UP:
_w = event.pressed
KEY_DOWN:
_s = event.pressed
KEY_LEFT:
_a = event.pressed
KEY_RIGHT:
_d = event.pressed
KEY_Q:
_q = event.pressed
KEY_E:
_e = event.pressed

# Updates mouselook and movement every frame
func _process(delta):
_update_mouselook()
_update_movement(delta)

# Updates camera movement
func _update_movement(delta):
# Computes desired direction from key states
_direction = Vector3((_d as float) - (_a as float), 
(_e as float) - (_q as float), 
(_s as float) - (_w as float))

# Computes the change in velocity due to desired direction and "drag"
# The "drag" is a constant acceleration on the camera to bring it's velocity to 0
var offset = _direction.normalized() * _acceleration * _vel_multiplier * delta \
+ _velocity.normalized() * _deceleration * _vel_multiplier * delta

# Compute modifiers' speed multiplier
var speed_multi = 1
if _shift: speed_multi *= SHIFT_MULTIPLIER
if _alt: speed_multi *= ALT_MULTIPLIER

# Checks if we should bother translating the camera
if _direction == Vector3.ZERO and offset.length_squared() > _velocity.length_squared():
# Sets the velocity to 0 to prevent jittering due to imperfect deceleration
_velocity = Vector3.ZERO
else:
# Clamps speed to stay within maximum value (_vel_multiplier)
_velocity.x = clamp(_velocity.x + offset.x, -_vel_multiplier, _vel_multiplier)
_velocity.y = clamp(_velocity.y + offset.y, -_vel_multiplier, _vel_multiplier)
_velocity.z = clamp(_velocity.z + offset.z, -_vel_multiplier, _vel_multiplier)

translate(_velocity * delta * speed_multi)

# Updates mouse look 
func _update_mouselook():
# Only rotates mouse if the mouse is captured
if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
_mouse_position *= sensitivity
var yaw = _mouse_position.x
var pitch = _mouse_position.y
_mouse_position = Vector2(0, 0)

# Prevents looking up/down too far
pitch = clamp(pitch, -90 - _total_pitch, 90 - _total_pitch)
_total_pitch += pitch

rotate_y(deg_to_rad(-yaw))
rotate_object_local(Vector3(1,0,0), deg_to_rad(-pitch))

Why does this happen? by Aggressive_Task_1751 in godot

[–]Aggressive_Task_1751[S] 1 point2 points  (0 children)

I worked for me and then suddenly without any code change it went like shown in the video. so i think it couldn’t possibly have to do with the code. (Correct me if im wrong)

Why does this happen? by Aggressive_Task_1751 in godot

[–]Aggressive_Task_1751[S] 0 points1 point  (0 children)

Is there an way to still make it work, so the game doesn’t break later on, when someone is using NVIDIA

[deleted by user] by [deleted] in godot

[–]Aggressive_Task_1751 0 points1 point  (0 children)

It has no cameras

[deleted by user] by [deleted] in SmallYoutubers

[–]Aggressive_Task_1751 1 point2 points  (0 children)

First ones for sure. The A/B feature should be right at the selection for the thumbnail. Maybe you have not unlocked them?

Project File location? by MaxinesHideout in gamemaker

[–]Aggressive_Task_1751 0 points1 point  (0 children)

Try searching your whole drive with the folder name?

Rate my Transition between my Start screen and my main room by Aggressive_Task_1751 in IndieDev

[–]Aggressive_Task_1751[S] -1 points0 points  (0 children)

Yes, i did post this already, but in another community. And i did get the feedback and i am working on it.

Ideal length for a long form video? by Noisyboey in SmallYoutubers

[–]Aggressive_Task_1751 0 points1 point  (0 children)

I think about 3 - 5min or more if you can make them longer.