Announcement

Collapse
No announcement yet.

[HELP] To get the concept behind smartphone in a game

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

    [HELP] To get the concept behind smartphone in a game

    Hello community,

    I want to create a smartphone in my game where you could use it to chat players, get information about your character, see the map, and use it as a flashlight. I understand that I need a model for the phone and let's say I have it. So do I get this right?

    #1. The smartphone is a static mesh that is let's say attached to a socket in the hand when equipped.
    #2. The player controls the phone with mouse moving the character's finger.

    What I really wonder is: How to make it change the display? Like when you click on the "messanger" app, the messanger app shows up on the screen and you choose people to chat up? Or how would I show the map on the screen? Render to Texture maybe? If it's RTT then how do I implement it?

    Above all, is it even possible to make a messanger for the phone in the game?

    Because I was thinking of changing the texture of the phone whenever you click. But if I take the messanger into account then it would be impossible to do it with textures. So do you have any ideas? Or is there even tutorial on how to make it? Cuz I've seen it in games but never seen tutorial. Tried googling but didn't found anything..

    PS. Sorry for my english
    Raise the Black Flag!

    - [TUT]: HTTP GET Request in C++
    - [Tool]: Game Site Tracker website for your project
    - [Website]: Website for my game Leviathan

    #2
    It's best to use Slate or UMG with a RenderTexture or UMG's 3D component-based widget for this sort of thing and slap it on the phone's screen. You would just animate the menus in/out, remove from parent, add to viewport, it's fairly straightforward stuff. 3D widget would probably be easiest since it uses UMG (which is crazytown banana pants simple) and allows for mouse interaction out of the box.

    Though I feel like your idea of moving the thumb with the mouse is a bit expensive and wholly difficult without finger IK. Cool, but maybe impractical.

    Either way you can see a mini-essay I did on in-game cellulars (which may or may not be helpful for you) here: https://forums.unrealengine.com/show...l=1#post168966

    You can see a demonstration of the 3D widget system here: https://www.youtube.com/watch?v=dsrZ...J6Ll7UbfhI4iwQ
    iTween For UE4
    Procedural pathed animation for actors, components & UMG - $0
    Runtime DataTable
    DataTables dynamically loaded from text or Google Sheets while your game is running!
    easyCSV
    Fast, cheap, and accurate CSV parsing at runtime!

    Comment


      #3
      I think I got it..

      So I create a new Blueprint in UE4 and create a component for StaticMesh (for the phone model) and component for the widget right? And I just code my widget to do what I want. Well if it's that it's pretty easy thing to do, but what I wonder is, can I pass C++ variables to the 3d widget? I mean.. If I make the messaging system through the phone, can I get all the message history from database and output it in the widget? That would mean getting data from DB with C++ and passing it to Blueprint. Is that possible?
      Raise the Black Flag!

      - [TUT]: HTTP GET Request in C++
      - [Tool]: Game Site Tracker website for your project
      - [Website]: Website for my game Leviathan

      Comment


        #4
        Yes, absolutely. Just like you can communicate with BP classes through C++, you can communicate with widget BPs. You can also create c++ function nodes and use them in your widget graph to get info to display.
        iTween For UE4
        Procedural pathed animation for actors, components & UMG - $0
        Runtime DataTable
        DataTables dynamically loaded from text or Google Sheets while your game is running!
        easyCSV
        Fast, cheap, and accurate CSV parsing at runtime!

        Comment


          #5
          Great, but in my 4.6 version I can only create a new Widget Blueprint or Gadget. How do I make a 3D widget? Or have I misunderstood something? Just checked on wiki there's even done tutorial on how to use C++ vars thanks, I'll begin my work today.
          Raise the Black Flag!

          - [TUT]: HTTP GET Request in C++
          - [Tool]: Game Site Tracker website for your project
          - [Website]: Website for my game Leviathan

          Comment


            #6
            The 3D widget is a component of a 3D actor. You create a UMG widget like normal then add a widget component to your actor and choose the UMG widget you created before as the widget to project. It's all outlined in the video I posted earlier
            iTween For UE4
            Procedural pathed animation for actors, components & UMG - $0
            Runtime DataTable
            DataTables dynamically loaded from text or Google Sheets while your game is running!
            easyCSV
            Fast, cheap, and accurate CSV parsing at runtime!

            Comment

            Working...
            X