No announcement yet.

StaticMeshComponent location different on play, don't know why

  • Filter
  • Time
  • Show
Clear All
new posts

    StaticMeshComponent location different on play, don't know why

    Basically, I made an Actor blueprint that holds a StaticMeshComponent of a model I imported. I programmed the blueprint to have the static mesh hover slowly up and down like a powerup. I tried implementing the code shown in the C++ quickstart in blueprint instead for the faster compile time. While it technically does that, I had dragged an instance into the middle of my scene, but upon test playing it, the mesh is located at the side of the wall instead. (3rd person view template)

    My blueprint has no manipulation of the X or Y axes, so there should be no reason why the mesh isn't where I placed it. Additionally, I exported it centered at <0, 0, 0> cm. units and the blueprint's viewport reflects that.

    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	162.0 KB
ID:	1154547

    Looks like he's getting set to 0,0 x and y coords on the map since you have those set to 0. Try grabbing the x and y from the actors current location and putting those in there so he only moves on the z axis

    You did say your BP can't manipulate x and y, though? Not sure what that means. All I know is if I were to SetActorLocation, and kept 0,0 then it'd move to those coords


      Ooooh okay. Thanks. And by X/Y manip. I meant not supposed to do anything with them.
      Last edited by Laphicet Crowe; 06-28-2015, 11:22 PM.