|
Post by RoguesGalleryGames on Apr 20, 2019 21:18:19 GMT
I'm wanting to add the pistol laser sight to the shotgun and rifle. I can't figure it out. Any clues? I think it has to do with the aim ID, but I'm not sure.
Also, do I have to access the dpad on screen UI during runtime to make changes to it?
Thanks
One other thing, I notice that if you spam the reload button during the reload animation it will keep reloading. Is this a getbutton vs getbuttondown issue?
|
|
|
Post by chainsawpenguin on Apr 21, 2019 6:26:30 GMT
There's a laser sight built into the vHandgun prefab. Copy those into the "muzzle" object of the rifle. In the vHandgun prefab, navigate to the vShooterWeapon, and select Events. Replicate the OnEnableAim and OnDisableAim events in the vAssaultRifle's vShooterWeaponEvents, and drag the copied Laser in as the object.
If you need a more detailed explanation, let me know!
|
|
|
Post by RoguesGalleryGames on May 1, 2019 6:53:50 GMT
There's a laser sight built into the vHandgun prefab. Copy those into the "muzzle" object of the rifle. In the vHandgun prefab, navigate to the vShooterWeapon, and select Events. Replicate the OnEnableAim and OnDisableAim events in the vAssaultRifle's vShooterWeaponEvents, and drag the copied Laser in as the object. If you need a more detailed explanation, let me know! I got around to doing that all tonight, but the laser sight will not enable on aim. If I click the laser sight on in the inspector, then it will activate but it stays activated the entire time. I changed the aim ID to 1, which is the handgun as well. Thanks
|
|
|
Post by chainsawpenguin on May 1, 2019 19:16:25 GMT
The aim ID shouldn't matter, but I get your logic. Hmm... The laser object should by default be off, and OnEnableAim should set the GameObject to Active, and OnDisableAim should set it to Not Active. Make sure that the Active box is checked for OnEnableAim, and unchecked for OnDisableAim.
If that doesn't resolve your issue, can you share a screenshot of the vShooterWeapon Events?
|
|