Announcement

Collapse
No announcement yet.

Accessing a child component of the mesh

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

    Accessing a child component of the mesh

    I am trying to activate the FirstPersonCamera in the thirdpersoncharacter class. How would I get the mesh, then it's camera component, then activate that camera component. Thanks in advance
    Attached Files

    #2
    Hello, I think i'm not the one that will realy help you but while waiting for a better answer :
    I don't know for the activate part but if you want to get any component in your BP, just drag and drop it to any graph. If you want to access it from elsewhere :
    GetPlayerCharacter->CastToYourCustomPlayerCharacterClass->getFirstPersonCamera
    has you see you don't need to get the mesh, all components that is part of your BP (not adding in Instances) are public and can be access without passing throuth his parent component.
    [Edit] sorry we are in the C++ section, so my answer is not realy nice^^. i'll make a new one.
    Last edited by ElFab; 09-25-2018, 04:23 AM.

    Comment


      #3
      It realy depend of the context, from where do you want to access it? If you realy want to use c++ for this part, you should first create a sublass of ThirdPersonCharacter in c++ and add your component from there, your life will be better, (not impossible but harder and not optimised). Then create a BP from your new ThirdPersonCharacter class (or not).

      Comment

      Working...
      X