Announcement

Collapse
No announcement yet.

Spawn to actor Location

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

  • replied
    You right, thanks. I solved

    Leave a comment:


  • replied
    As I can see in Siengriedblueprint he did not use get actor transform and the spawn actor orientation is set to 0,0,0 (default value) so it will always face at 0,0,0 orientation you need to use get actor transform and split struct pin to get the actor orientation so if you look at a direction X you are supposed to spawn the actor at the last known orientation. I don't know if I understand correctly your issue. It might be an issue with you get forward vector returning you the wrong value check if the actor spawn always like 90 degree of where you looking at if so try (rotate vector around axis) and connect the in vector to your (get forward vector) angle degree at 90 and axis to a (get up vector)...
    Last edited by brahoule; 03-29-2018, 07:04 PM.

    Leave a comment:


  • replied
    Same problem. He will spawn every time in the right direction even if i m watching at my left

    Leave a comment:


  • replied
    Then just use GetActorLocation

    Leave a comment:


  • replied
    i want that the actor spawn in the same place of my previous actor... With this method, with no moltiplication, my actor still spawn every time in the same direction, no matter if i m watching at right or left
    Last edited by Siengried; 03-29-2018, 10:13 AM.

    Leave a comment:


  • replied
    Yes how far ahead in cm. of the actor you want the location to be.

    Leave a comment:


  • replied
    Offset is the distance in cm of what?

    Leave a comment:


  • replied
    Click image for larger version

Name:	Offset.PNG
Views:	61
Size:	49.7 KB
ID:	1451534

    This should do the trick.

    Leave a comment:


  • replied
    I still can't spawn it corretly... how i m suppose to do?

    Leave a comment:


  • replied
    Excuse me, but i m using x, y and z, so it's like i m using a vector. Can you show me a BP please?

    Leave a comment:


  • replied
    I assume you want to spawn something ahead of the actor?

    You do this by using GetActorLocation + ( GetForwardVector x float Offset ). The Offset is the distance in centimeters ahead.

    No need to break the vector return value from either GetActorLocation or GetForwardVector since you will need all 3 axes.

    GetForwardVector is a 3d direction Vector and since you only use the X axis you get a 1d direction magnitude along only the x axis.
    Last edited by GarnerP57; 03-26-2018, 08:11 PM.

    Leave a comment:


  • started a topic Spawn to actor Location

    Spawn to actor Location

    Hi all...
    I spawn an actor to my current actor location. All works apart if i spawn watching to my left, the actor spawn far. If i watch to the rght, the actor spawn correctly, if i watch at my left the actor spawn far... why?
Working...
X