tri
February 1, 2023, 7:23pm
1
I’m trying to get my gun model (pistol) to always follow the camera’s position.
This line of code sets the parent of the gun mesh as the camera.
In the inspector, the gun successfully becomes a child of the camera
However, you can walk anywhere and the pistol doesn’t move. Using setParent() also has the same result for me.
If i replace the gun with a simple box, it works just fine…
What is it that I’m doing wrong, that the child node wont follow the camera location, but a normal box will?
Thank you in advance
tri
February 1, 2023, 7:59pm
3
Hi, thanks for your help, but useParent() has the same result for me
tri
February 1, 2023, 9:03pm
5
No worries, thanks for your help. I’ll look more into this problem tomorrow
Hello! Just checking in, are you still having this problem?
1 Like
tri
May 4, 2023, 11:19am
7
Oh, haha! I forgot about this thread!
I don’t remember fixing it for models, but it seemed to work for a babylonjs box instead, so I just used that instead to represent the gun
Thanks for checking in
2 Likes