Announcement

Collapse
No announcement yet.

Anyway to spawn projectile from the gun instead of body?

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

    Anyway to spawn projectile from the gun instead of body?

    Hello, Im learning the blueprint-system and just recently started with it a few days ago. (Note that i do not really have much experience with C++ or any other language)

    I've got to the point where I can spawn a projectile from my Character actor using a Collision sphere as spawnpoint, but I'd like to make it spawn from the tip of the gun instead, and also is there anyway to make the Weapon-template spawn the bullet instead of the Character actor?

    The "script" or whatever its called in this situation is based on the projectile spawning used in the standard FPS Blueprint.

    Click image for larger version

Name:	Spawn Projectile-ue3.png
Views:	1
Size:	175.4 KB
ID:	1225547

    #2
    You can get a component or sockets world location and rotation to use instead of actors.

    e.g. Add a socket to your guns mesh called 'muzzle', then do GunMesh -> GetSocketLocationAndRotation using 'muzzle' -> put that into SpawnActor bla.
    Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

    Comment

    Working...
    X