Some problem with pistol reload and with assault

Nikot93

New member
Hi,

I encountered a problem loading the gun, here you can find a video


and also another problem with the assault rifle.

After taking two pistols, if I choose to fire with the assault rifle the left arm is no longer visible.

Here you can see a video before taking two pistols


and after



Sorry for my bad english.

Nicolò
 
This is likely related to culling. This video explains how to fix the render bounds:
 
This is likely related to culling. This video explains how to fix the render bounds:
Sorry, but i think is another problem, you can see in this video:


and what about pistol reloader?

 
What is the problem? Please list the specific issue as well as what time it occurs. For the pistol clips make sure they have a TrajectoryObject.
 
What is the problem? Please list the specific issue as well as what time it occurs. For the pistol clips make sure they have a TrajectoryObject.
As you can see in the last video, when I take the assault rifle both arms are visible. After taking two pistol if I still use the assault rifle the arms are no longer visible because the game object of both arms remains disabled.
 
Hm did you set up all your items according to the video? If you drop your existing items into the Item Manager, does it have the correct objects in the First Person Base etc?
 
Hm did you set up all your items according to the video? If you drop your existing items into the Item Manager, does it have the correct objects in the First Person Base etc?
Honestly, for the moment I haven't changed anything in the character because I'm still testing it. I'm using the photon addon demoroom scene and the nolanpun character exactly as it was imported.
 
Also, are you able to repro it in the pun demo scene from a fresh project?
By re-importing everything into a new project, I'm not having the same problem with the assault rifle anymore, so I think I will start making changes on the new project even if I cannot understand what the problem may be in the previous project.

The only problem that is still there is that when I reload the gun the clip stays in the air.
Looking in the forum I saw that this problem was also reported by another user but I have not found a solution.
This is the thread https://www.opsive.com/forum/index....-in-the-description-question-about-cars.3675/
You told me to make sure that the clip has the TrajectoryObject but you have to forgive me, unfortunately I'm still a beginner and I can't understand what to do, but looking at the clips of the other weapons there are no differences and only with the pistol this happens.

I found that on support page https://opsive.com/support/documentation/ultimate-character-controller/objects/trajectory-object/
but I don't understand how it can help me in this case because the problem is that at the moment of reloading if the character moves, the clip does not follow the movement of the gun but remains stationary in one point and then disappears as you can see in the following video from the new project.

I hope I have explained because I am not good with English. Sorry ?
 
The clip does need the TrajectoryObject component, although I'm assuming you haven't removed it. You can check by going to your gun's ShootableWeapon component and selecting the prefab from its "Reload Drop Clip" (under the "Reload" section). This prefab should have a TrajectoryObject component, something like this:

1605183509166.png

It also looks like it may be a parenting issue with the clip, but check the TrajectoryObject first for now.
 
The clip does need the TrajectoryObject component, although I'm assuming you haven't removed it. You can check by going to your gun's ShootableWeapon component and selecting the prefab from its "Reload Drop Clip" (under the "Reload" section). This prefab should have a TrajectoryObject component, something like this:

View attachment 4296

It also looks like it may be a parenting issue with the clip, but check the TrajectoryObject first for now.
Thanks a lot, I checked and the clip already has the TrajectoryObject component.
What else should i check?


I send two screenshots if you want to see

https://u.pcloud.link/publink/show?code=XZuJTzXZ8PL6FYQAvh73tff3cxXhdma7cMbV ShootableWeapons Screen

https://u.pcloud.link/publink/show?code=XZWJTzXZzi7npWGWMq7GW8nyX6fTfVt5y0xX Clip TrajectoryObject Component Screen
 
I tried to reproduce it within the demo scene but wasn't able to. I did notice that multiple clips were dropped when they shouldn't be so I fixed that but from the demo scene everything should work correctly. One way to debug this would be to place a breakpoint within TrajectoryObject.Initialize to ensure it is being initialized when the pistol is reloaded. If it's not initialized then the object won't move.
 
I tried to reproduce it within the demo scene but wasn't able to. I did notice that multiple clips were dropped when they shouldn't be so I fixed that but from the demo scene everything should work correctly. One way to debug this would be to place a breakpoint within TrajectoryObject.Initialize to ensure it is being initialized when the pistol is reloaded. If it's not initialized then the object won't move.
I have placed a breakpoint and when the pistol is reloaded the TrajectoryObject it is being initialized.
Here you can find some screenshot.

BreakPoint.pngbreakpoint2.PNGbreakpoint3.PNG
 
Version 2.2.6 was just released so I would first try that update to see if everything works. I would try it within a fresh project with just the demo assets first.

Based on your call stack it does look like things are being initialized so that is good. You'll next want to check that the TrajectoryObject.Move method is called. This is what moves the clip down.
 
Version 2.2.6 was just released so I would first try that update to see if everything works. I would try it within a fresh project with just the demo assets first.

Based on your call stack it does look like things are being initialized so that is good. You'll next want to check that the TrajectoryObject.Move method is called. This is what moves the clip down.
With the new version i have created a new project and there is the same problem.
I have placed a breakpoint on TrajectoryObject.Move and this is the result.


trajectoryobject.move.PNG
 
With the new version how I reproduce it from a fresh project? When I go to the PUN demo scene and drop the pistol clips they fall correctly. Does it work correctly in the regular demo scene? This uses the same prefab.
 
With the new version how I reproduce it from a fresh project? When I go to the PUN demo scene and drop the pistol clips they fall correctly. Does it work correctly in the regular demo scene? This uses the same prefab.
Yes, they fall correctly if you don't move your character, but when you reload and rotate or move the character the clips doesn't follow the gun.
The problem is also present in the demoscene on which I did all the tests with a new project and without any changes.
 
Top