Functional Test to Click and Drag Sphere From Left to Right

Hello,

The following is the setup - a sphere that manually I can click (hold the left mouse button) and drag and the sphere will rotate accordingly (i.e. if I start with the mouse at the center of the sphere, click and hold, then move the mouse left, the globe will rotate left from our perspective).

I would like to create a functional test that does the exact same thing. The issue is that I do not understand how to click and hold down the mouse and then move the mouse automatically.

You can do it in the following way:

RotateSphereWithMouse

My Products

2 Likes

Try this:

1 Like

Are you suggesting use all three blueprints together?

I suppose I don’t quite understand how this blueprint specifically accomplishes any part of the task.

How to move the cursor automatically:

Automatically

Correct me if I’m wrong but this looks like the mouse is just moving along with the sphere as the sphere rotates. Is that correct?

I do not see any visual indication that there is a mouse button being pressed.

Nice work though. I’m not saying it’s not good. Just curious what you’re thinking.

I showed the way how to move the mouse automatically and make an emulation of the sphere rotation.

Do you know of a way in which you can have the mouse click and hold on the sphere and then it moves automatically?

You could try just changing the mouse cursor when the player presses it for this. I think that’s what a lot of games do. Change it to a grabby hand or something.

Anyway, I’ll let you get back to the main topic. @Supremative is doing a great job.

What I’m saying is you run the test, the sphere will pop up in the window, then the cursor will automatically move to some designated spot on the globe (I chose the middle of the viewport) and then the mouse will initiate a click and hold and move the globe any which way we desire. Meaning this whole scenario is done via blueprint. No user input and not an emulation. Does that make sense?

I guess it is sort of unclear on the request. Can you give an example of a game that does what you are asking?

From your original post, it seemed like you wanted something similar to the movement in an MMO character creator, where if you want to see different sides of the character, you can mouse click on them and spin them around by dragging the mouse. Is that not what you want?

Edit: To be clear here, I have no idea how to do any of this, I just want to make this more understandable so any other posters here don’t keep spending time drawing up huge Blueprints that don’t help you.

The intent isn’t really for a game. Just some proof of concept testing. Want to be able to create a suite of tests that do various things that an operator will such as click and hold and move around a globe. Another test would be using the mouse scroll to zoom in and out. Does that make sense?

You could use GetHitResultUnderCursorByChannel instead of OnClicked. Thus you can use the same logic to move your sphere manually and automatically, like a proper functional test.

I hope this will be at least somehow useful for you.

Thank you. Yes this is useful.