Announcement

Collapse
No announcement yet.

Centering the 3D Model in Named Slot Viewport

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

    Centering the 3D Model in Named Slot Viewport

    Hi Everyone.

    I have a Blueprint Widget that I use to show the buildings that the player can place in the world depending on some criteria, when the user selects one of the buttons the Idea is to center the spawned actor in the place that the named slot shows in the next Image:

    Click image for larger version

Name:	104635-widget.png
Views:	1
Size:	221.9 KB
ID:	1192395

    This is done by passing the location of the Slot inside the widget using the next blueprint to a C++ Function:
    Click image for larger version

Name:	104636-blueprint.png
Views:	1
Size:	164.5 KB
ID:	1192394

    But I'm not a 100% percent sure if that is actually giving me the location I want of the viewport for that slot and it's centered position...

    But it still creates and shows the spawned building in the game but it shows it in a wrong position, so here are some screens of this.

    The spawned building should appear inside the red square:
    Click image for larger version

Name:	104640-not inside of slot.png
Views:	1
Size:	368.1 KB
ID:	1192397

    But it appears in a wrong location (well whe could actualli say it's the right location determined by the viewport position, but like in the image before I want to make it appear inside of the named slot), has shown in this image:
    Click image for larger version

Name:	104638-it's way up on the z value.png
Views:	1
Size:	439.4 KB
ID:	1192396

    Any help so I can solve this it would be great, or any other idea on how I could tackle this would be great.
Working...
X