<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Godot &#8211; Gary Michael Angelone Jr.</title>
	<atom:link href="https://garyangelonejr.me/tag/godot-it/feed/" rel="self" type="application/rss+xml" />
	<link>https://garyangelonejr.me</link>
	<description></description>
	<lastBuildDate>Tue, 11 Nov 2025 16:08:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Planetary Gravity</title>
		<link>https://garyangelonejr.me/planetary-gravity/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 10:46:29 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">http://localhost/?p=19</guid>

					<description><![CDATA[Daniel had and idea for mobile game about a chimp, lost in space.  He asked me to help him design a prototype in Godot.]]></description>
										<content:encoded><![CDATA[<div class="fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling" style="--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;"><div class="fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap" style="max-width:1248px;margin-left: calc(-4% / 2 );margin-right: calc(-4% / 2 );"><div class="fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column" style="--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:0px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;"><div class="fusion-column-wrapper fusion-flex-justify-content-flex-start fusion-content-layout-column"><div class="fusion-text fusion-text-1 translate lang-en "><p>Daniel had and idea for mobile game about a chimp, lost in space.  He asked me to help him design a prototype in Godot.</p>
</div><div class="fusion-text fusion-text-2 translate lang-de"><p>Daniel hatte eine Idee für ein Handyspiel über einen Schimpansen, der sich im Weltraum verirrt hat. Er bat mich, ihm bei der Entwicklung eines Prototyps in Godot zu helfen.</p>
</div><div class="fusion-text fusion-text-3 translate lang-it"><p>Daniel aveva un'idea per un gioco per dispositivi mobili su uno scimpanzé perso nello spazio. Mi ha chiesto di aiutarlo a progettare un prototipo in Godot.</p>
</div><div class="fusion-text fusion-text-4 translate lang-en "><p>The object would be to find the solve puzzles and find objects with which to build a rocket and blast off to the next planet. For this we'd need the gravity to always point to the center of the planet.</p>
</div><div class="fusion-text fusion-text-5 translate lang-de"><p>Das Ziel wäre es, Rätsel zu lösen und Objekte zu finden, mit denen man eine Rakete bauen und zum nächsten Planeten starten kann. Dazu müsste die Schwerkraft immer zum Zentrum des Planeten zeigen.</p>
</div><div class="fusion-text fusion-text-6 translate lang-it"><p>L'obiettivo sarebbe quello di risolvere enigmi e trovare oggetti con cui costruire un razzo e decollare verso il pianeta successivo. Per questo avremmo bisogno che la gravità fosse sempre diretta verso il centro del pianeta.</p>
</div><style type="text/css" scopped="scopped">.fusion-syntax-highlighter-1 > .CodeMirror, .fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters {background-color:transparent;}.fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters { background-color: transparent; }.fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color3); }</style><div class="fusion-syntax-highlighter-container fusion-syntax-highlighter-1 fusion-syntax-highlighter-theme-light no-translate" style="opacity:0;margin-top:0px;margin-right:0px;margin-bottom:3em;margin-left:0px;font-size:14px;border-width:2px;border-style:dashed;border-color:var(--awb-color2);"><div class="syntax-highlighter-copy-code"><span class="syntax-highlighter-copy-code-title" data-id="fusion_syntax_highlighter_1" style="font-size:14px;">Copy to Clipboard</span></div><label for="fusion_syntax_highlighter_1" class="screen-reader-text">Syntax Highlighter</label><textarea class="fusion-syntax-highlighter-textarea" id="fusion_syntax_highlighter_1" data-readonly="nocursor" data-linenumbers="1" data-linewrapping="1" data-theme="default" data-mode="text/x-less">func getAxis(down, axis):
	# GET AXIS BASED ON CENTER #
	if axis==0:
		return down.rotated(deg2rad(-90))
	if axis==1:
		return down

func _physics_process(delta):
	get_input()

	# SET CENTER OF GRAVITY AND ROTATION #
	var down = (current_orbit.gravity_vec - transform.origin).normalized() 
	rotation = down.angle() - PI/2

	# ADD GRAVITY #
	move_velocity.y+=(current_orbit.gravity * delta) * gravity_scale
	
	# ADD CONTROLLED MOVEMENT #
	velocity = getAxis(down, 0) * move_velocity.x
	velocity += getAxis(down, 1) * move_velocity.y
	
	# MOVE AND SLIDE # 
	var snap = getAxis(down, 1) * 32 if !is_jumping else Vector2.ZERO
	velocity = move_and_slide_with_snap(velocity, snap, -getAxis(down, 1), true, 4, deg2rad(50), false)
	
	# UPDATE MOVE AND SLIDE VELOCITY # 
	if is_on_floor():
		move_velocity = velocity.rotated(-rotation)</textarea></div><div class="video has-mask" style='mask-position:center center;mask-size:cover;mask-image:url("https://garyangelonejr.me/wp-content/themes/Avada-Child-Theme/img/masks/mask-03.png");'><div class="fusion-video fusion-selfhosted-video mask  wrapped" style="margin-bottom:3em;max-width:100%;"><div class="video-wrapper"><video playsinline="true" width="100%" style="object-fit: cover;" autoplay="true" muted="true" loop="true" preload="auto"><source src="/vid/post/PlanetaryGravity.mp4" type="video/mp4">Sorry, your browser doesn't support embedded videos.</source></video></div></div></div></div></div><div class="fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-flex-column" style="--awb-padding-top:3em;--awb-padding-bottom:6em;--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:3.072%;--awb-margin-bottom-large:0px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:3.072%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;"><div class="fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column"><div style="text-align:center;"><a class="fusion-button button-flat fusion-button-default-size button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type fusion-animated" data-animationtype="flipiny" data-animationduration="0.3" data-animationoffset="top-into-view" target="_blank" rel="noopener noreferrer" href="https://github.com/KoschKX/Godot-PlanetaryGravity"><i class="fa-arrow-circle-down fas awb-button__icon awb-button__icon--default button-icon-left" aria-hidden="true"></i><span class="fusion-button-text awb-button__text awb-button__text--default">GitHub Project</span></a></div></div></div></div></div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
