Announcement

Collapse
No announcement yet.

Some Basic Questions

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

    Some Basic Questions

    Hello all,
    1. Why the moving the character by mouse click works only in TopDownTeplate, and not in (for example) ThirdPerson? If you create PlayerController in ThirdPerson, and create even the basic Simple Move to Location logic, it doesnt work.
    2. I want to move the camera with the Right Mouse button, so i made a function that does just that, but i cant move the camera around the character in 360° degrees... It just stops when the mouse cursor hits the edge if the game window, or end of the desktop. In the Project Properties -> Input there are Viewport Properties i tried, but none of the options solves the issue. Also the Left Mouse button acts as "switch" that solves this. (If you press Left Mouse button, while holding down the Right Mouse button, ie. moving with the camera, it magically works... ) Dont you know how to fix this?
    3. Im looking for a way how to make a button switch (ie, you press the button, the character walks, you press the button again, the character stops). I created a such switch by using a button event,branch and a Set Variable node that controls the movement logic. Is there a better way how to make such switch?
    4. I am looking for a way how to stop some functions from executing, when i dont want them to be executed (for example the mouse click move)
    5. I want to create a decal on the position where the character should move and then delete it after the character arrives to the desired location. Spawn Decal at location works well, but the decal persists. Maybe because the character never moves exactly to the clicked location? (it stops near it) Right now, im using a location comparator conected to the event tick, and the Set fade out node, what according to me should work, but doesnt. Instead, it deletes the previous decal when clicked... a something i want to use aswell.
    6. Is it wise to connect a lot of functions/features to event tick? Wouldnt it become laggy?

    Thats all for now, ty for your time.
    Last edited by Phantas; 07-18-2017, 08:57 AM.

    #2
    My $.02

    4. What about a boolean variable "Can Walk" and then a Branch? When the player clicks the mouse it first looks at the variable in the branch and on the False wide you could put a "You cannot Move" message or something
    6. Yes it's unwise to run a bunch of functions off of event tick unless you really need them all on tick - which is unlikely
    Every day I beat my own previous record for the number of days I've stayed alive!

    Comment


      #3
      I noticed that the problem with the camera movement i am experiencing is connected with the Show Mouse Cursor bool... (the problem appears when is that bool set to true)

      I just opened PlayerController.h in notepad and found this bool "bHideCursorDuringCapture(true)" in there. (Part of the FInputModeGameAndUI ())

      This could solve the problem, but how to add this to the blueprint? Or if is already there, where i can turn it on?

      Comment


        #4
        2. You have to set the mouse cursor position in the middle of the screen on tick while paning your cam so the cursor cannot reach the edge of the screen
        4. A branch to prevent it from executing, a return node to stop it's execution
        6. It depends on your functions, but you should always set a branch to avoid useless executions

        Comment


          #5
          I decided to use the "Set Input Mode Game And UI" instead. It's working nicely when connected to BeginPlay.
          Semi-working, because i want it to work with Right Mouse only, and not with all Mouse buttons.
          And i cannot assign the prefered mouse button to it.
          And the function overrides the Viewport Properties in the Project Settings -> Engine -> Input, so i cannot use the "Capture During Right Mouse Down" either.

          Comment


            #6
            For a few days, i have been trying to get it work by connecting it to various events, and nothing so far.

            Except BeginPlay, i tried connecting it behind Mouse buttons.
            After Left Mouse Button, i been experiencing cursor flickering, and one my function that uses Left/Right Mouse buttons to be pressed together, stopped working. (if was the Right Mouse Button pressed first)
            After Right Mouse Button, i am unable to rotate camera.

            7. Why i am not able to get reference for the Spring Arm for my Camera Zoom function in Player Controller blueprint? That function works in the Character Blueprint, but Cast To TopDown Character, to get the Spring Arm doesn't work.

            Comment

            Working...
            X