Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Making projectiles appear they *Were* shot out of a weapon

Discussion in 'Scripting' started by primoadamg, Aug 22, 2009.

  1. primoadamg

    primoadamg

    Joined:
    Aug 17, 2009
    Posts:
    98
    Okay I know there are easier ways to do this but what I'm trying to pull off is making it look like I'm shooting an under barrel grenade from the bottom of my gun I'm holding in the characters hands But I want it to be as accurate as possible to line up with the reticle in the center of my screen and make it actually look like it came out of the bottom of the gun... I know this isn't something I should be trying considering my newbish state :D but its things like this that keep me wanting to continue making something so is it something someone can pull off with a little script or am I thinking too far ahead?

    Thanks
     
  2. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    A simple way for you to effect this is to create a dummy game object, make your gun it's parent and move it to the proper position. You then have an easily accessible marker to spawn the grenade in the proper place.
     
  3. primoadamg

    primoadamg

    Joined:
    Aug 17, 2009
    Posts:
    98
    Alright, I like it short, sweet, and to the point...
    I'll look into it, Thanks!