Announcement

Collapse
No announcement yet.

Click and Drag Rotate Static Mesh Blueprint?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I still haven't got it working, I must be missing something because I've done what you've stated above.

    Thanks for agreeing to help me, I've added you on Skype.

    Comment


      #17
      Originally posted by cybereality View Post
      Ok, try this:

      [ATTACH=CONFIG]32634[/ATTACH]

      Basically I just added another variable float to track the y motion (dragSumY) and duplicated the get mouse logic to track the y as well.

      I also changed "add actor local rotation" to "add actor world rotation" to avoid strange behavior when upside-down.

      Hope that helps.
      Hi,
      I'm trying to use your explanations tu make a simple clic&drag rotation on a cube.
      Since I use the 4.9.2 version, some things have to be changed in the blueprint, such as the float - float functions.
      I modified the Cube's blueprint with your suggestions and created the variables there ; the only way to detect leftclick while playing is to change the "LeftMouseButton" event and put OnClick(Cube) and OnReleased(Cube) Events instead. When clicking, the variable is set to true, the event tick sends informations to "AddActorWorldRotation" function but nothing happens there and the cube doesn't rotate.

      I've correctly (i guess...) set up the gamemode, using a playercontroller allowing the cursor.
      I dunno if I had to put some of these blueprint scripts in the level blueprint or so ?

      Thanks a lot.

      Comment

      Working...
      X