LBRY Block Explorer

LBRY Claims • introduction-to-godot-3d-(part-3-–

4ffb6d51645607c9e49f7c33324f5baa896c133f

Published By
Created On
10 Mar 2024 14:57:27 UTC
Transaction ID
Cost
Safe for Work
Free
Yes
Introduction to Godot 3D (Part 3 – Level Design and Player Movement) | Godot 3.2
In this series of tutorials, we will be exploring the basics of Godot 3D

These tutorials are based on the Godot Docs

In this tutorial we will be learning the basics of Godot including basic level design and character movement

Download Godot: https://godotengine.org/

Godot Docs: https://docs.godotengine.org/en/stable/

Kenney Platformer Kit: https://www.kenney.nl/assets/platformer-kit

#Godot #gamedev #indiedev

-----------------------------------------------------------------

Player Movement Code:

extends KinematicBody

# Declare member variables here. Examples:
var speed = 150
var direction = Vector3()
var gravity = -9.8
var velocity = Vector3()
var jump_speed = 6

# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

func _physics_process(delta):
direction = Vector3(0 , 0, 0)
if Input.is_action_pressed("move_left"):
direction.x -=1
if Input.is_action_pressed("move_right"):
direction.x +=1
if Input.is_action_pressed("move_forward"):
direction.z -=1
if Input.is_action_pressed("move_backward"):
direction.z +=1
direction = direction.normalized()
direction = direction * speed * delta

velocity.y += gravity * delta
velocity.x = direction.x
velocity.z = direction.z

velocity = move_and_slide(velocity, Vector3(0, 1, 0))

if is_on_floor() and Input.is_action_pressed("jump"):
velocity.y = jump_speed

--------------------
I am a prop and environment artist specializing in stylized and low-poly props and environments for games and animation.

Visit my site:
https://oldetinkererstudio.com/

Join me on my Discord:
https://discord.gg/KRFha7Y4x5

Support me on Itch:
https://olde-tinkerer.itch.io

Dribbble:
https://dribbble.com/jsabbott

Art Station:
https://www.artstation.com/jsabbott

Sketchfab:
https://sketchfab.com/jsabbott

Behance:
https://www.behance.net/jsabbott

YouTube:
https://www.youtube.com/jsabbott

Twitter:
https://twitter.com/jsabbottcreates

Blender Nation:
https://www.blendernation.com/author/jsabbott/

Blender Swap:
https://www.blendswap.com/profile/166042
...
https://www.youtube.com/watch?v=FvW39fNgVws
Author
Content Type
Unspecified
video/mp4
Language
English
Open in LBRY

More from the publisher

Controlling
VIDEO
HOW T
Controlling
VIDEO
HOW T
Controlling
VIDEO
HOW T
Controlling
VIDEO
HOW T
Controlling
VIDEO
HOW T
Controlling
VIDEO
MEDIE
Controlling
VIDEO
HOW T
Controlling
VIDEO
HOW T
Controlling
VIDEO
QUICK