Help w/ E2 parenting to a certain part of a player needed
3 replies, posted
Hello... This might be a bit stupid question, especially because I'm not a beginner when it comes to E2 but... how do I parent to the shootPos() of a player? Obviously since shootPos() returns a vector and not an entity, stuff can't be parented directly to it. Is there any entity, attachement, bone, whatever, at the exact same location that I can parent to? I don't want to use the runOnTick(1) setPos(Player:shootpos()) method, because that makes stuff lag behind when the player is moving. I guess that calculating in the player's speed and using setpos would also be a way to do it, but I'd rather solve the problem with parenting, if possible.
If it's a hologram you're parenting, you can do holoParentAttachment(n, e, "anim_attachment_head") after positioning it at the player's shootpos.
If it's a prop, just parent a hologram to the player's head and then parent the prop to the hologram.
[QUOTE=arbio22;50757575]If it's a hologram you're parenting, you can do holoParentAttachment(n, e, "anim_attachment_head") after positioning it at the player's shootpos.
If it's a prop, just parent a hologram to the player's head and then parent the prop to the hologram.[/QUOTE]
I tried it, it sort of works, but it's far from perfect, I got the same result with parenting to the "forward" attachment earlier. Is there a better way?
Is it because it moves around with the head bone itself? If so, you could try positioning and parenting it to the player's weapon using E:weapon(), then adding Z offset so it's in line with their head. The downside of that is whatever you're using will become unparented if the player dies or loses their weapons.
Sorry, you need to Log In to post a reply to this thread.