I need to know if is posibile to make an actor to move on all axes, let say im in space and i wana move the actor by double clicking in any direction, i had some tries but none worked, if someone can give a basic example of how can be done so i can start from there.
i wana move the actor by double
clicking in any direction
Your screen is 2d - so you can’t have any direction, and the space is 3d so you need to take that 3rd dimension from somewhere - perhaps you double click and the actor moves in the direction it’s facing?
Could you produce an example or a sketch of how this would work?
To make it better to understand, there will be no " LandScape". just space and i wana move the actor on all 3 axes Y Z X by double clicking in that direction, like flyng but instead of using keys i wana use double click.
Other than that, I have no idea how else it’s supposed work atm.
You can also create virtual planes with line-plane intersection node, that would allow you to move in any direction; you provide the location and a normal and get a 3d world coordinate, and that’s without relying on world geometry.
You could then line-trace from the actor towards a line-plane intersection result of the mouse-to-world conversion. That’d give you freedom of movement based on the actor location, unlike the one I demoed above which is based on camera position.
It is a bit hard to explain every aspect from first time.
doubleclick will set the max speed and direction of the actor once it triggered
direction is still based on camera but you can rotate camera and double click in diferent direction ( like you show, but you can rotate camera to choose a different direction)
sphere is hollow, is just an image with stars, planets etc (like sky_sphere bp where you see clouds)
camera is with actor all time
the problem i face at the moment, i when i click the actor moves only on axes Y and X it never goes to Z when i click
As example if you know game eve online, i try to do that movement with double click.
direction is still based on camera but
you can rotate camera and double click
in diferent direction ( like you show,
but you can rotate camera to choose a
different direction)
In this case, what I’ve shown above should work OK-ish - at least for now. Imagine you’re shooting a 5000 uu long ray from the centre of the screen (camera) using mouse cursor as the target. The red arrow is pointing at where that point would be in 3d space - here demonstrated by the orange sphere:
It’s camera based already - the example above actually has a standard springarm camera setup. Rotating the camera should work fine (untested, though),
doubleclick will set the max speed and
direction of the actor once it
triggered
The velocity is whatever you put into the scale value - it scales and accumulats vectors over the duration of a frame and then applies it to a Floating Pawn Movement component of that Pawn:
You’re using an inherited character movement component. Initially you said that you’d be moving an actor, yet here we have a fully fledged character - which is a highly specialised type of actor not really geared towards the kind of movement you’ve described.
Slapping a floating pawn movement on top here does absolutely nothing.
For a Character, ensure the gravity scale is set to 0 and experiment with this:
Untested but should allow you to move in Z freely. Not sure how well this will work. Might be great, might be terrible.