Y angle appears to be working, but the X angle does not (Especially noticeable for the wider enemy).
I also tried to spawn it using enemy.Width()/2, with just the same results. On top of that, I’ve noticed that even though I want the text to spawn at the enemy’s “center,” it instead spawns at the enemy’s origin point instead?
Does anybody know how to make the text appear center and above an enemy, no matter the height like what you typically see in games?
I believe that the “Center” point is capitalized (if using the default one), so you may want to double check because “center” and “Center” are seen as two different locations, so if it’s looking for “center” it’s not there and therefore positioning it at enemy (0,0)
Does the dmgText field have the word “Damage” in it already, or is the text being updated when created?
I have had a few issues like this too, there may be another way, but what I have done is create the object at an off-screen location, then position it to (in your case) enemy.X(“Center”)-(dmgText.Width()/2), because without the object being created it does not seem to be able to determine the width of the text object until after creation. So I don’t know if that would help, but maybe give it a try and see if you get your text pos correct.
Ohhh, you mean like an object repository? Like what Construct 3 does? That’s clever.
Although, I added a text object to the scene, and nothing happened. The object is still stuck in the same spot as before when it’s created (I decided not to change the position of it because I want it to be created)
Alright, I’ve added the positions, and the text still insists on spawning from it’s origin point, although, I did get it close enough to the center that it’s not very noticeable because of this, so thanks for both of your help ^^