[solved] how to make a mesh react to the cursor?

299248-follow.gif

It’s a BP:

suppose the cursor is at lower left corner, then the mesh dampens at lower left and if the cursor is at lower right corner then the mesh dampens at lower right.
Any help would be great since I am very new to ue.

I don’t need the object moving after cursor, I just need it to rotate when the cursor moves on it.
I have been able to achieve this.But I can’t make it to rotate according to where the cursor is. Like it should rotate +10 on y axis if the cursor is on top and -10 on y axis if cursor is on bottom

Ah, then I would do it with the object in a BP and a line trace.

( gimme a little while )

Ok, I have this:

299362-ball.gif

But I think it’s a lot of code if you don’t already have it setup.

Do you have a line trace from the camera? This example uses one that returns the overlapped component name.

You also need to have blueprint interfaces setup between the player and the sphere.

Does this make any sense?

I will see if there is a simpler way…

Ok, I have the same thing working with the mouse cursor. It’s more simple, but your game needs to have a visible mouse cursor.

Which one do you want to know about? :slight_smile:

i like nice

Hey Clockwork, this is my buddy’s post. For some reason he can’t reply to your comment. The game we’re working on does have a visible mouse cursor and a static camera. If you could point us in the right direction as to what we need to do to achieve that dynamic rotation, it would be a HUGE help. We’re trying our best to utilize our time working on this in these strange times. Thanks a lot.

thanks for the help guys

No worries. Ok, so just make an actor BP with the ball in it. On Tick, put this:

The custom event MoveBall:

Tell me how it goes :slight_smile:

299399-ball.gif

Hey, there isn’t really any gold mine of BP information I’m afraid. You tube and the epic site are the best places to look. You have to decide what exactly you’re trying to do and start googling… :slight_smile:

Okay Clockwork, I will use this BP and tell you how it goes.
Also can you tell me any source to study blueprints and get into development as fast as possible. Since, i am very new to ue, it would be of great help.

okay thanks :slight_smile:

299432-gd.jpg

I’m not able to get the variable with the target node. Can you tell me how to get target node in the promoted variable.

Just pull the pin from the sphere and look for relativerotation :slight_smile: