I’m working on reproducing a simple asteroids clone, and I want the objects to instantly jump from the left side of the screen to the right side of the screen. I’m half way there (pun intended), in so much that my objects do jump from the screen’s left boundary to another location … but that location is always the center of my screen instead of the right side. I’ve posted a section of my blueprint setup to show where I’m at in my thought process, but for some reason, something’s a little off. Hence the jumping to the center instead of jumping to the right side of the screen. Any help or alternate methods would be greatly appreciated!
it’s x for width and y for height?(your event is wrapX, but in the graph you only switched Y to player controller location)
and you get playercontroller as target to convert, it should be a pawn(since player controller is a different entity entirely, and usually don’t follow pawn).
Say if you move PlayerStart to 1/4 from the left edge, then I’m pretty sure you will only be 1/4 way there(pun reused).
Thanks for the reply! I can explain the Y coordinate being the left-right axis, actually. When I modeled the assets and export/imported, I found that I had to rotate them to face the static camera view properly. I have confirmed that the Y transform moves the models left and right according to the camera. It’s a fudge, I know, but I’m certain that’s the translation I want to do (as changing it to X moves it farther/closer). The game is played through a static camera’s view, as my player pawn is seen from “above” on the playing field. Am I incorrect in using the player controller to get the game window/view resolution?
Oh, you’re totally right! I didn’t even notice that before. I also took a second to read the description of the conversion blueprints I’m using and they’re converting the mouse X and Y … not the object’s X and Y … so I’m going to have to rework that entire section. Thanks for helping me ferret that out! I’ll post the solution once I get it working, in case anyone else needs it.
Hmm, I revamped the whole thing to try and use project and deproject in the HUD, but that doesn’t seem to be what I needed. Re-evaluating the Player Controller -> Screen Coordinates to 3D Space node, I think it’s just a typo where someone at Epic copied / pasted the Mouse Coordinate equivalent and didn’t change the node description. Still investigating.
If you did found odd behavior, you can post it on answerhub with bug tag, they are usually investigated first.
But make sure it is not behave as intended.
Unfortunately, I haven’t been able to resolve this one in an elegant manner. I think it may have something to do with how the actors and camera are oriented in my world, because the object is moving when it’s X position reaches the negatives (left side of the screen), it’s just not moving to the correct screen location on the camera when it “wraps”. Since this is a relatively small non-commercial project, I’m just going to resort to hard coding the values for world unit translations instead of converting from 2D coordinates to 3D world space. In the future, I’ll be more mindful of my initial level setup as well. Thanks again for the help!