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"

Inherited Sphere Component Rotates incorrectly

I have two balls which are able to be controlled. PhysicsBallBP, and MASTER_PLAYER. PhysicsBallBP moves around correctly, as shown below. alt text

And then I have MASTER_PLAYER, which is a child of MASTERBALL, and it moves around as shown below. alt text

The MASTERBALL blueprint consists solely of a sphere, and a collider (nothing in the event graph). Everything in the class defaults is identical between MASTERBALL, MASTER_PLAYER, and PhysicsBallBP.

PhysicsBallBP and MASTER_PLAYER have identical event graphs, with the relevant movement code shown belowalt text

The root of the issue is that the MASTER_PLAYER rotates according to the rotation of the ball, as opposed to how the camera is facing. PhysicsBallBP will always go forward/left/right/down relative to the camera when the left thumbstick is pushed forward/left/right/down. however, the MASTER_PLAYER will rotate however the ball is oriented.

If you look at the "Bad Movement" gif, then you can see the ball initially spinning on it's side, which is caused by the ball trying to go "forward", but because it's on it's side, it just spins in place. The ideal is how PhysicsBallBP handles it and just goes forward no matter what.

I found that the issue was specifically in the Sphere that MASTER_PLAYER inherits from MASTERBALL, because when i added a new sphere as a component in MASTER_PLAYER (which was not a child of MASTERBALL), it moved as desired.

In short, my question is, is there anything with inheritance and child blueprints which could cause the inherited sphere to operate oddly. All the properties of the Sphere in MASTERBALL and the Sphere in PhysicsBallBP are the same. Screenshots of the MASTERBALL, and MASTER_PLAYER hierarchies are included below. alt textalt text

Product Version: UE 4.18
goodmovement.gif (994.0 kB)
badmovement.gif (956.0 kB)
screenshot-18.png (140.7 kB)
screenshot-20.png (134.7 kB)
screenshot-24.png (255.3 kB)
more ▼

asked Feb 22 '18 at 07:59 AM in Blueprint Scripting

avatar image

1 1

(comments are locked)
10|2000 characters needed characters left

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