Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Object rotation by mouse screen position

Hi! I have a model presentation app and have to get ability to rotate camera around the model (not to rotate model in front of the camera). Scheme should work with touch and LMB pressed as well.

Camera is a child to null static mesh "Cam_0_Dummy" and uses its rotation axis, so I need to rotate static mesh, not camera.

As I understand, I need to get mouse (finger) position on the screen when LMB is pressed or touch happens -> check current world rotations of the Cam_0_Dummy -> keep tracking the movement until LMB is released and constantly combine this data with Dummy world rotations. So, when rotation stops - Dummy should be left in the summ of previous rotation and the latest that was done according the length of the path that cursor made on the screen. When LMB pressed again I need that new "path" that mouse or finger does on the screen will be added to previous rotations, so movement will continue it's way. Pretty usual scheme.

Problem in current graph - every time LMB is pressed world rotations are reset and gets the new data from mouse position on the screen (#1 in the printscreen) , but not add it to previous condition that static mesh was left in. If Combine node (#2) with World Rotation of the Dummy is connected it works like a multiplier for rotations and makes object rotate as crazy)))

In more simple words... Imagine, that you are trying to scroll down the web page with mouse wheel and, every time you rotate the wheel, page goes back to top and start scrolling from the beginning)))

What should I add to this graph or change to fix the problem?

And in addition - is there any way to add limits to rotations? For example to lock rotations from 0 to 180 degrees.

Great thanks for any help! I really need it.... alt text

Product Version: UE 4.20
more ▼

asked Dec 02 '18 at 07:55 PM in Blueprint Scripting

avatar image

1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question