Godot: Position2D node not sending proper location - godot

I am new to Godot and am currently making a roguelike game. It's in the very beginning stages, but I am stuck on one specific part. I have a system set up so that when you click on a certain space, the player will move to the position 2D node associated with that space. However, whenever I actually try it out, after clicking in the area the player moves to what appears to be a set area instead of where I want.
With this problem, I have no real idea how to fix it or what to search for on the internet because I am new to Godot and game development. I was hoping someone could answer my question directly here.

Related

Godot: is there any way to stop a node that's following a path?

More specifically, is there any way to stop a node that's following a path when it comes across (overlaps) one of the points on that path?
I am trying to make a game with movement like in FTL Faster Than Light, where when you click in a certain space your crew will move to a spot in that area.
I have been using a Path2D and a PathFollow node to make the crew follow the path, and if they come across an area2d node they will stop. However, this does not really fit what I need, because the crew stop before they actually get to where they need to go.

Stutter with a moving platform using Tween movement

I'm having stuttering issues with a specific type of platform in my game, a vertical moving platform. Right now I'm moving it with a tween with the interpolate_property function, where the platform will tween itself from the position its currently at, and the next position is knows to go to. However I'm not quite sure if this is causing the issue, of if there is some deeper engine issue I'm not aware of.
Here is the line of code used for moving the platform:
the way it loops through all its checkpoints is by a signal of tween_completed
tween.interpolate_property(self, "position", self.position, nextCheckpoint,
speed,Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
video showing the bug
https://i.gyazo.com/f6b73ea763077e91917264d1188eaccf.mp4

How to get the position of a different object in gdscript?

I have a player, and I want to be able to detect when they are near a ball so they can press 'E' to kick it.
I'm new to godot and I'm probably just dumb but I can't figure out how to get the position of another object.
I have 3 separate scenes: MainScene(Node2D), Player(KinematicBody2D), and Ball(RigidBody2D). I want to attach a script to one of the scenes that detects how close the Player is to the Ball so they can kick it.
I'm not sure if I should attach the script to the MainScene, the Player scene, or the Ball scene and to be honest, I'm not entirely sure how the code should look. I'm not very familiar with the functions and the node/scene hierarchy is a little confusing.
I am familiar with Python, I just think I'm overwhelmed with this engine (its my first time using a game engine) and I'm having a bit of a tough time grasping it.
Any help would be greatly appreciated!
Side-quest: If you are feeling extra helpful I also need to figure out how to stop a RigidBody2D object from moving until the player hits 'E' on it to kick it!
For this you want an Area2D, which is purpose-built for "detecting nearby objects" without interacting with them physics-wise. Have an Area2D as a child of the Player node and connect the Player node to that Area2D's body_entered signal. Here's a tutorial on using Area2D for further info; this tutorial also links to various other tutorials that could be helpful.
i think you maybe use function
get_overlapping_bodies()
(of Area2D node) for detect another areas or body

How do I generate a "sketch" animation to introduce a 3D scene?

I get an image of a games 3D scene (using render to texture) rendered in OpenGL. How would I go about generating what looks like the image being sketched in real time? I'm just talking outlines with this, not colouring.
I haven't been able to find a decent example. I know they exist, but sadly I wasn't thinking of trying to imitate it, the last time I saw the effect, so I can't retrieve the original source.
The idea would be that the player would enter a new location. They would see a white screen, upon which the "scene" would appear to be sketched in real time, before fading into the actual 3D scene.
I would like to do this procedurally, rather than prerender it, so that any changes to the scene wouldn't need the extra work of changing the intro every time the scene is updated.

How to read Location of a view whilst it is being animated

I am animating a small space ship (derived from UIView) and periodically (whilst in animation) send it a PointF to check if this is near the space ship's current position.
However, when reading out the Frame position of the View it keeps returning the starting position before the animation started.
I think this is by design but it is causing me big problems since the space ship(s) should move independently along Paths and it is very tricky for me to do this by hand.
Is there another way - and/or has anyone some sample code?
Not sure of a workaround for your issue, but I have some suggestions on game development for iOS.
Your problem is one of the reasons why using GUI frameworks like UIKit/CoreGraphics for games isn't a good idea. For both performance reasons, as well as the fact as they aren't designed for it.
If you are looking for a simple framework for making games on iOS, have you looked at MonoGame? If you are doing lots of animations, we also use XNA Tweener along with MonoGame to get some lifelike animations.
PS - check out our game here.

Resources