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.
And then I have MASTER_PLAYER, which is a child of MASTERBALL, and it moves around as shown below.
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 below
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.
asked Feb 22 '18 at 07:59 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here