Announcement

Collapse
No announcement yet.

Implementing player construction: Issues with rendering placement placeholder

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

    Implementing player construction: Issues with rendering placement placeholder

    Hello all,

    I am trying to add player construction to my game. I want a player to be able to place a foundation in the game world (a square box) that they can build on top of. I have an idea of how to make it work but I am running into issues.

    As shown in the image below I added an actor component (that green thing) to my character. Then in the blueprint (which is shown in the video) I try to update the position of this component. I want it to be placed on the ground where the players mouse is pointing so I did a ray trace to a custom object channel that I created just for the map floor. I was hoping to get the coordinates of the intersection and use that as the origin of the visualization. Here are the issues I am having:

    1) As shown in the video, when I move my mouse around the rendering of the foundation movement is very jumpy. I suspect this is because I am processing that blueprint each tick instead of each frame. Not sure how to fix that; lerp?

    2) The location of the object is not changing. It's stuck at the original anchor point. I am able to change its rotation if I plug a number into that Make Transform component.

    3) The rotation of the object is set to that of the parent object instead of the world. I'm not sure how to update the rotation, relative to the parent, as I move the parent. How do I keep it level with the world?

    Quick video I made showing what it looks like:
    https://www.youtube.com/watch?v=DwC6...ature=youtu.be

    Picture of character components view:


    Any suggestions? Thank you!
Working...
X